equinor / ert

ERT - Ensemble based Reservoir Tool - is designed for running ensembles of dynamical models such as reservoir models, in order to do sensitivity analysis and data assimilation. ERT supports data assimilation using the Ensemble Smoother (ES), Ensemble Smoother with Multiple Data Assimilation (ES-MDA) and Iterative Ensemble Smoother (IES).
https://ert.readthedocs.io/en/latest/
GNU General Public License v3.0
105 stars 107 forks source link

DEBUG and INFO logging bleeding to console, should be only added to the log files #9269

Open DanSava opened 1 week ago

DanSava commented 1 week ago

How to reproduce:

everest run test-data/everest/math_func/config_minimal.yml

Example:

INFO:everest:everest:'11.1.0b7.dev72+gc4a2062e5.d20241118'
ropt:'0.9.0'
ert:'11.1.0b7.dev72+gc4a2062e5.d20241118'
INFO:everest:Output directory: .../ert/test-data/everest/math_func/everest_output
DEBUG:everest:Namespace(config_file='.../ert/test-data/everest/math_func/config_minimal.yml', debug=False)
 * Serving Flask app 'everest.detached.jobs.everserver'
 * Debug mode: off
INFO:werkzeug:WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
 * Running on all addresses (0.0.0.0)
 * Running on https://127.0.0.1:5000
 * Running on https://192.168.1.241:5000
INFO:werkzeug:Press CTRL+C to quit
INFO:everest:Using random seed: 123
INFO:everest:To deterministically reproduce this experiment, add the above random seed to your configuration file.
DEBUG:everest:Storing internal data in .../ert/test-data/everest/math_func/everest_output/.internal_data
DEBUG:everest:Storing internal data in .../ert/test-data/everest/math_func/everest_output/.internal_data
DEBUG:everest:Creating job description .../ert/test-data/everest/math_func/everest_output/.jobs
INFO:everest:Using random seed: 123
INFO:everest:To deterministically reproduce this experiment, add the above random seed to your configuration file.
DanSava commented 1 day ago

Did some digging yesterday while debugging an unrelated issue and I found out that if we set logger.propagate = False in configure_logger this will stop the submodule loggers to propagate log messages to the root longer and will clean up most of the unwanted/un-needed logs from the console.

verveerpj commented 1 day ago

Yes, that is an option, but that is considered bad practice, so I am a bit hesitant to do that. It may have some unexpected consequences.