sync lib not dr
This commit is contained in:
parent
c7140e0ef2
commit
8eabaa8d9c
@ -20,7 +20,7 @@ class Logger(Options):
|
||||
outputs: List[BaseOutputStream] = []
|
||||
|
||||
enable: bool = True
|
||||
level: int = 20
|
||||
level: int = 20 # info
|
||||
|
||||
def log_for(self, level: int) -> bool:
|
||||
"""
|
||||
|
@ -28,7 +28,7 @@ __all__ = [
|
||||
class BaseOutputStream(Options):
|
||||
name = 'BaseOutputStream'
|
||||
|
||||
level: int = 10
|
||||
level: int = 20
|
||||
enable: bool = True
|
||||
|
||||
formatter: BaseFormatter
|
||||
@ -49,7 +49,7 @@ class BaseOutputStream(Options):
|
||||
class StdioOutputStream(BaseOutputStream):
|
||||
name = 'StdioOutputStream'
|
||||
|
||||
level: int = 10
|
||||
level: int = 20
|
||||
formatter: BaseFormatter = StdFormatter()
|
||||
|
||||
def write_stdout(self, message: LogMessage) -> None:
|
||||
@ -81,7 +81,7 @@ class StdioOutputStream(BaseOutputStream):
|
||||
class FileCacheOutputStream(BaseOutputStream):
|
||||
name = 'FileCacheOutputStream'
|
||||
|
||||
level: int = 10
|
||||
level: int = 20
|
||||
formatter: BaseFormatter = StdFormatter(enable_color=False)
|
||||
text_cache: io.StringIO = None
|
||||
|
||||
|
@ -6,8 +6,9 @@
|
||||
|
||||
import time
|
||||
|
||||
from pathlib import Path
|
||||
from types import FrameType
|
||||
from typing import List, Optional, Tuple, Dict
|
||||
from typing import List, Optional, Tuple, Dict, Union
|
||||
|
||||
from lib_not_dr.types.options import Options
|
||||
|
||||
@ -92,7 +93,7 @@ class LogMessage(Options):
|
||||
return int(self.log_time / 1000000) % 1000
|
||||
|
||||
|
||||
FormattingMessage = Tuple[LogMessage, Dict[str, str]]
|
||||
FormattingMessage = Tuple[LogMessage, Dict[str, Union[str, Path]]]
|
||||
|
||||
if __name__ == '__main__':
|
||||
print(LogMessage().as_markdown())
|
||||
|
Loading…
Reference in New Issue
Block a user