Skip to content

Commit 81e9957

Browse files
authored
Merge pull request #53 from tkrille/fix-config-root-logger
Fix condition for checking root logger handlers
2 parents eb8211d + 8f755c0 commit 81e9957

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

json_logging/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def config_root_logger():
8181
"""
8282
global _default_formatter
8383

84-
if len(logging.root.handlers) > 0:
84+
if not logging.root.handlers:
8585
_logger.error(
8686
"No logging handlers found for root logger. Please made sure that you call this after you called "
8787
"logging.basicConfig() or logging.getLogger('root')")

0 commit comments

Comments
 (0)