File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -82,15 +82,15 @@ def config_root_logger():
82
82
if ENABLE_JSON_LOGGING :
83
83
ENABLE_JSON_LOGGING_DEBUG and _logger .debug ("Update root logger to using JSONLogFormatter" )
84
84
if len (logging .root .handlers ) > 0 :
85
- if _current_framework is not None or _current_framework != '-' :
86
- util .update_formatter_for_loggers ([logging .root ], JSONLogWebFormatter )
87
- else :
85
+ if _current_framework is None or _current_framework == '-' :
88
86
util .update_formatter_for_loggers ([logging .root ], JSONLogFormatter )
89
- # remove all handlers for request logging
90
- request_logger = _current_framework ['app_request_instrumentation_configurator' ]().get_request_logger ()
91
- if request_logger :
92
- for handler in request_logger .handlers :
93
- request_logger .removeHandler (handler )
87
+ else :
88
+ util .update_formatter_for_loggers ([logging .root ], JSONLogWebFormatter )
89
+ # remove all handlers for request logging
90
+ request_logger = _current_framework ['app_request_instrumentation_configurator' ]().get_request_logger ()
91
+ if request_logger :
92
+ for handler in request_logger .handlers :
93
+ request_logger .removeHandler (handler )
94
94
else :
95
95
_logger .error (
96
96
"No logging handlers found for root logger. Please made sure that you call this after you called "
You can’t perform that action at this time.
0 commit comments