Skip to content

Commit

Permalink
Remove file handler entirely if logfile not used.
Browse files Browse the repository at this point in the history
Signed-off-by: Robin Kupper <[email protected]>
  • Loading branch information
DiddiZ committed May 2, 2023
1 parent a05cd65 commit 62e1f94
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mlflow_export_import/common/logging_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ def _create_default_log_config(output_path=None, log_format=None):
file_handler = cfg["handlers"]["file"]
file_handler["filename"] = output_path
else:
handlers = cfg["root"]["handlers"]
handlers.remove("file")
# Remove file handler
del cfg["handlers"]["file"]
del cfg["root"]["handlers"]["file"]

return cfg

0 comments on commit 62e1f94

Please sign in to comment.