Formatter add self info

This commit is contained in:
shenjack 2023-11-01 19:13:25 +08:00
parent bf1ae6a5ab
commit e78a9a9fc0
Signed by: shenjack
GPG Key ID: 7B1134A979775551

View File

@ -33,6 +33,7 @@ class BaseFormatter(Options):
cache = ''
for formatter in cls.sub_formatter:
infos[formatter.name] = formatter._info()
infos[cls.name] = cls._info()
for name, info in infos.items():
cache += f"## {name}\n"
cache += info
@ -164,7 +165,6 @@ class StdFormatter(BaseFormatter):
return ''
if __name__ == '__main__':
print(TimeFormatter.info())
print(TimeFormatter().format_message(LogMessage(messages=['Hello World!'])))