diff --git a/rwx/log/__init__.py b/rwx/log/__init__.py index 50048e5..5470e67 100644 --- a/rwx/log/__init__.py +++ b/rwx/log/__init__.py @@ -3,29 +3,29 @@ import sys def get_file_logger(name: str) -> logging.Logger: + # formatter formatter = logging.Formatter( "%(name)s: %(asctime)s | %(levelname)s | %(filename)s:%(lineno)s | %(process)d >>> %(message)s", ) - # + # handler out_handler = logging.StreamHandler(stream=sys.stdout) out_handler.setFormatter(formatter) out_handler.setLevel(logging.INFO) - # + # logger logger = logging.getLogger(name) logger.addHandler(out_handler) logger.setLevel(logging.INFO) - # return logger def get_stream_logger(level: int) -> logging.Logger: + # handler out_handler = logging.StreamHandler(stream=sys.stdout) out_handler.setLevel(level) - # + # logger logger = logging.getLogger() logger.addHandler(out_handler) logger.setLevel(level) - # return logger