From eb6e250ba2d5ec275893e1c8aaf6fb357f8aab7b Mon Sep 17 00:00:00 2001 From: shenjack <3695888@qq.com> Date: Wed, 1 Nov 2023 20:01:03 +0800 Subject: [PATCH] Add Level color formatter ( name undecide ) --- lib_not_dr/logger/formatter.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/lib_not_dr/logger/formatter.py b/lib_not_dr/logger/formatter.py index 7bbfba8..0176bff 100644 --- a/lib_not_dr/logger/formatter.py +++ b/lib_not_dr/logger/formatter.py @@ -26,10 +26,6 @@ class BaseFormatter(Options): @classmethod def info(cls) -> str: infos = {BaseFormatter.name: BaseFormatter._info()} - # cache = "## Base Formatter\n" - # cache += BaseFormatter._info() - # cache += f"## {cls.name}\n" - # cache += cls._info() cache = '' for formatter in cls.sub_formatter: infos[formatter.name] = formatter._info() @@ -162,7 +158,17 @@ class StdFormatter(BaseFormatter): @classmethod def _info(cls) -> str: - return '' + return 'None' + + +class LevelColorFormatter(BaseFormatter): + name = 'LevelColorFormatter' + + enable_color: bool = True + + @classmethod + def _info(cls) -> str: + return 'None' if __name__ == '__main__':