Skip to content

Commit d28d0c9

Browse files
committed
Update _setup_root_logger() to not add stream handler
1 parent 2c513a4 commit d28d0c9

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

xcdat/_logger.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
LOG_FORMAT = (
88
"%(asctime)s [%(levelname)s]: %(filename)s(%(funcName)s:%(lineno)s) >> %(message)s"
99
)
10-
1110
LOG_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

4433
def _setup_custom_logger(name, propagate=True) -> logging.Logger:
4534
"""Sets up a custom logger.

0 commit comments

Comments
 (0)