From 282e2ac7a1490bcdf748d6c66580c555f584bc0b Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Thu, 13 Jun 2024 10:16:53 +0200 Subject: [PATCH] log/level --- rwx/log/__init__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rwx/log/__init__.py b/rwx/log/__init__.py index fcf01aa..50048e5 100644 --- a/rwx/log/__init__.py +++ b/rwx/log/__init__.py @@ -18,15 +18,15 @@ def get_file_logger(name: str) -> logging.Logger: return logger -def get_stream_logger() -> logging.Logger: +def get_stream_logger(level: int) -> logging.Logger: out_handler = logging.StreamHandler(stream=sys.stdout) - out_handler.setLevel(logging.INFO) + out_handler.setLevel(level) # logger = logging.getLogger() logger.addHandler(out_handler) - logger.setLevel(logging.INFO) + logger.setLevel(level) # return logger -stream = get_stream_logger() +stream = get_stream_logger(logging.INFO)