From 357a996051256ba94ccdd1711e5beba7079cde9c Mon Sep 17 00:00:00 2001 From: shenjack <3695888@qq.com> Date: Tue, 28 Nov 2023 00:29:41 +0800 Subject: [PATCH] fix typing --- src/lib_not_dr/logger/logger.py | 2 +- src/lib_not_dr/logger/structure.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib_not_dr/logger/logger.py b/src/lib_not_dr/logger/logger.py index 53de8c2..bf8d8aa 100644 --- a/src/lib_not_dr/logger/logger.py +++ b/src/lib_not_dr/logger/logger.py @@ -147,7 +147,7 @@ class Logger(Options): """ from lib_not_dr.logger.config import storage if storage.have_logger(name): - return storage.get_logger(name) + return storage.loggers[name] return Logger(logger_name=name) def info(self, diff --git a/src/lib_not_dr/logger/structure.py b/src/lib_not_dr/logger/structure.py index 0528102..e166403 100644 --- a/src/lib_not_dr/logger/structure.py +++ b/src/lib_not_dr/logger/structure.py @@ -25,9 +25,9 @@ class LogMessage(Options): split: str = ' ' # 消息的属性 - flush: bool = None + flush: Optional[bool] = None level: int = 20 - log_time: float = None # time.time_ns() + log_time: float = 0.0 # time.time_ns() if None logger_name: str = 'root' logger_tag: Optional[str] = None stack_trace: Optional[FrameType] = None