always print warnings to stderr

This commit is contained in:
Daniel Langbein 2023-11-01 11:40:40 +01:00
parent 97c0ab61f0
commit 78870e8b2c
Signed by: langfingaz
GPG Key ID: 6C47C753F0823002
2 changed files with 2 additions and 4 deletions

View File

@ -48,7 +48,7 @@ def log():
logger_read_exs = []
logger_warnings = 0
for logger_ct, logger in enumerate(loggers, start=1):
print(f'Running logger {logger_ct}/{len(loggers)} ...')
# print(f'Running logger {logger_ct}/{len(loggers)} ...')
try:
logger.update()
except LoggerReadEx as e:

View File

@ -76,6 +76,4 @@ class WarnMessage:
def file(self) -> TextIO:
if self.level == WarnLevel.NONE:
raise ValueError()
if self.level >= WarnLevel.NORMAL:
return sys.stderr
return sys.stdout
return sys.stderr