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