Skip to content

Commit

Permalink
changing logic for LOG_file
Browse files Browse the repository at this point in the history
  • Loading branch information
rajithkrishnegowda committed Nov 12, 2024
1 parent c1b5269 commit c7d4e2b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion openfl/interface/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,8 @@ def cli(context, log_level, no_warnings):
# This will be overridden later with user selected debugging level
disable_warnings()
print("os.getenv log file path is {}".format(os.getenv("LOG_FILE")))
log_file = pathlib.Path(os.getenv("LOG_FILE")).expanduser().resolve()
if os.getenv("LOG_FILE") is not None:
log_file = pathlib.Path(os.getenv("LOG_FILE")).expanduser().resolve()
print("log file path is {}".format(log_file))
setup_logging(log_level, str(log_file))
sys.stdout.reconfigure(encoding="utf-8")
Expand Down

0 comments on commit c7d4e2b

Please sign in to comment.