Skip to content

Commit

Permalink
SimpleLoggingSetup: fix condition of addHandler / removeHandler callback
Browse files Browse the repository at this point in the history
  • Loading branch information
szilard-nemeth committed Aug 17, 2024
1 parent bf05e4a commit 3d9df4e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pythoncommons/logging_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -508,8 +508,8 @@ def _set_level_and_add_handlers(conf: SimpleLoggingSetupInputConfig, logger: log

# If we are in TEST mode and the handler is a FileHandler, don't replace it
callback = (
lambda handler: conf.execution_mode == ExecutionMode.TEST
and not SimpleLoggingSetup._is_file_handler(handler)
lambda handler: not (conf.execution_mode == ExecutionMode.TEST and
SimpleLoggingSetup._is_file_handler(handler))
)

if conf.remove_existing_handlers:
Expand Down

0 comments on commit 3d9df4e

Please sign in to comment.