Skip to content

Commit 62e1f94

Browse files
committed
Remove file handler entirely if logfile not used.
Signed-off-by: Robin Kupper <robin.kupper@rwth-aachen.de>
1 parent a05cd65 commit 62e1f94

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

mlflow_export_import/common/logging_utils.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ def _create_default_log_config(output_path=None, log_format=None):
5252
file_handler = cfg["handlers"]["file"]
5353
file_handler["filename"] = output_path
5454
else:
55-
handlers = cfg["root"]["handlers"]
56-
handlers.remove("file")
55+
# Remove file handler
56+
del cfg["handlers"]["file"]
57+
del cfg["root"]["handlers"]["file"]
5758

5859
return cfg

0 commit comments

Comments
 (0)