We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5891390 commit 44f3cb1Copy full SHA for 44f3cb1
dsg_lib/common_functions/logging_config.py
@@ -227,9 +227,18 @@ def write(self, message):
227
else:
228
raise # Reraise if max retries exceeded
229
230
+
231
+ basic_config_handlers = []
232
if file_sink:
233
# Create an instance of ResilientFileSink
234
resilient_sink = ResilientFileSink(str(log_path))
235
236
# Configure the logger to use the ResilientFileSink
- logger.add(resilient_sink, format=log_format)
237
+ basic_config_handlers.append(resilient_sink)
238
239
240
+ if intercept_standard_logging:
241
+ basic_config_handlers.append(InterceptHandler())
242
243
+ if len(basic_config_handlers) > 0:
244
+ logging.basicConfig(handlers=basic_config_handlers, level=logging_level.upper())
0 commit comments