Fix streams are patched by logger when logging to a non-main task

This commit is contained in:
allegroai 2023-04-25 10:00:00 +03:00
parent 71e1608ad8
commit f8d1c70daa

View File

@ -86,6 +86,7 @@ class Logger(object):
if disable_urllib3_info and logging.getLogger('urllib3').isEnabledFor(logging.INFO):
logging.getLogger('urllib3').setLevel(logging.WARNING)
if self._task.is_main_task():
StdStreamPatch.patch_std_streams(self, connect_stdout=connect_stdout, connect_stderr=connect_stderr)
if self._connect_logging: