Skip to content
This repository has been archived by the owner on Nov 28, 2022. It is now read-only.

Commit

Permalink
Bugfix when setting up default logger
Browse files Browse the repository at this point in the history
  • Loading branch information
rsnk96 committed Feb 3, 2022
1 parent 34e4c08 commit 391e2bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion logzero/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def setup_logger(name=__name__, logfile=None, level=DEBUG, formatter=None, maxBy
_logger.removeHandler(handler)
continue
elif isinstance(handler, logging.StreamHandler):
if log_stream is None or log_stream not in std_stream_handler.stream.name:
if log_stream is None or (std_stream_handler and log_stream not in std_stream_handler.stream.name):
# remove the std handler (stream_handler) if disabled, or if there is a stream(err/out) mismatch
_logger.removeHandler(handler)
continue
Expand Down

0 comments on commit 391e2bf

Please sign in to comment.