Formatter add self info
This commit is contained in:
parent
bf1ae6a5ab
commit
e78a9a9fc0
@ -33,6 +33,7 @@ class BaseFormatter(Options):
|
|||||||
cache = ''
|
cache = ''
|
||||||
for formatter in cls.sub_formatter:
|
for formatter in cls.sub_formatter:
|
||||||
infos[formatter.name] = formatter._info()
|
infos[formatter.name] = formatter._info()
|
||||||
|
infos[cls.name] = cls._info()
|
||||||
for name, info in infos.items():
|
for name, info in infos.items():
|
||||||
cache += f"## {name}\n"
|
cache += f"## {name}\n"
|
||||||
cache += info
|
cache += info
|
||||||
@ -164,7 +165,6 @@ class StdFormatter(BaseFormatter):
|
|||||||
return ''
|
return ''
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
print(TimeFormatter.info())
|
print(TimeFormatter.info())
|
||||||
print(TimeFormatter().format_message(LogMessage(messages=['Hello World!'])))
|
print(TimeFormatter().format_message(LogMessage(messages=['Hello World!'])))
|
||||||
|
Loading…
Reference in New Issue
Block a user