Skip to content

Commit 3213565

Browse files
committed
ignore warnings in codecs that are generated by logging2.FileHandler() calls; logging2 is an archived repo
1 parent 4414562 commit 3213565

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

wc_utils/debug_logs/core.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,18 @@ def setup_logs(self, options):
3939
if 'debug_logs' in options:
4040
options = options['debug_logs']
4141

42+
'''
43+
import warnings
44+
with warnings.catch_warnings():
45+
# Ignore warnings in codecs that are generated by logging2.FileHandler() calls
46+
# logging2 is an archived repo
47+
warnings.filterwarnings("ignore",
48+
category=RuntimeWarning,
49+
module='codecs')
50+
_, loggers = LoggerConfigurator.from_dict(options)
51+
'''
4252
_, loggers = LoggerConfigurator.from_dict(options)
53+
4354
self.logs = loggers
4455
return self
4556

0 commit comments

Comments
 (0)