File tree Expand file tree Collapse file tree 1 file changed +0
-11
lines changed Expand file tree Collapse file tree 1 file changed +0
-11
lines changed Original file line number Diff line number Diff line change 77LOG_FORMAT = (
88 "%(asctime)s [%(levelname)s]: %(filename)s(%(funcName)s:%(lineno)s) >> %(message)s"
99)
10-
1110LOG_LEVEL = logging .INFO
1211
1312
@@ -22,24 +21,14 @@ def _setup_root_logger():
2221 -----
2322 - The `force=True` parameter ensures that any existing logging configuration
2423 is overridden.
25- - The file handler is added dynamically to the root logger later in the
26- ``Run`` class once the log file path is known.
2724 """
2825 logging .basicConfig (
2926 format = LOG_FORMAT ,
3027 level = LOG_LEVEL ,
3128 force = True ,
3229 )
33-
3430 logging .captureWarnings (True )
3531
36- # Add a console handler to display warnings in the console. This is useful
37- # for when other package loggers raise warnings (e.g, NumPy, Xarray).
38- console_handler = logging .StreamHandler ()
39- console_handler .setLevel (logging .INFO )
40- console_handler .setFormatter (logging .Formatter (LOG_FORMAT ))
41- logging .getLogger ().addHandler (console_handler )
42-
4332
4433def _setup_custom_logger (name , propagate = True ) -> logging .Logger :
4534 """Sets up a custom logger.
You can’t perform that action at this time.
0 commit comments