Log documentation updates
This commit is contained in:
@@ -690,6 +690,7 @@ class Log(LogParent):
|
|||||||
def init_worker_logging(log_queue: 'Queue[str]') -> logging.Logger:
|
def init_worker_logging(log_queue: 'Queue[str]') -> logging.Logger:
|
||||||
"""
|
"""
|
||||||
This initalizes a logger that can be used in pool/thread queue calls
|
This initalizes a logger that can be used in pool/thread queue calls
|
||||||
|
call in worker initializer as "Log.init_worker_logging(Queue[str])
|
||||||
"""
|
"""
|
||||||
queue_handler = logging.handlers.QueueHandler(log_queue)
|
queue_handler = logging.handlers.QueueHandler(log_queue)
|
||||||
# getLogger call MUST be WITHOUT and logger name
|
# getLogger call MUST be WITHOUT and logger name
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ class LoggingLevel(Enum):
|
|||||||
WARN = logging.WARN # 30 (alias for WARNING)
|
WARN = logging.WARN # 30 (alias for WARNING)
|
||||||
FATAL = logging.FATAL # 50 (alias for CRITICAL)
|
FATAL = logging.FATAL # 50 (alias for CRITICAL)
|
||||||
|
|
||||||
# Optional: Add string representation for better readability
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def from_string(cls, level_str: str):
|
def from_string(cls, level_str: str):
|
||||||
"""Convert string to LogLevel enum"""
|
"""Convert string to LogLevel enum"""
|
||||||
|
|||||||
Reference in New Issue
Block a user