🔇 Feature: 调整日志输出格式与等级 (#1233)

This commit is contained in:
Ju4tCode
2022-09-09 11:52:57 +08:00
committed by GitHub
parent 179d7105c9
commit 8c42490a7e
29 changed files with 261 additions and 165 deletions

View File

@ -56,6 +56,9 @@ class MessageTemplate(Formatter, Generic[TF]):
self.factory: Type[TF] = factory
self.format_specs: Dict[str, FormatSpecFunc] = {}
def __repr__(self) -> str:
return f"MessageTemplate({self.template!r}, factory={self.factory!r})"
def add_format_spec(
self, spec: FormatSpecFunc_T, name: Optional[str] = None
) -> FormatSpecFunc_T: