Skip to content

Commit a014b3e

Browse files
committed
fix: wrap debug log when logger upated to using JSONLogFormatter
1 parent 0e520cc commit a014b3e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

json_logging/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def __init(framework_name=None, custom_formatter=None, enable_json=False):
127127
if ENABLE_JSON_LOGGING:
128128
logging._defaultFormatter = _default_formatter()
129129

130-
_logger.debug("Update all existing logger to using JSONLogFormatter")
130+
ENABLE_JSON_LOGGING and _logger.debug("Update all existing logger to using JSONLogFormatter")
131131

132132
existing_loggers = list(map(logging.getLogger, logging.Logger.manager.loggerDict))
133133
util.update_formatter_for_loggers(existing_loggers, _default_formatter)

0 commit comments

Comments
 (0)