Factory that configures and returns a LogService with loguru.
# Source: https://github.com/iflytek/astron-agent | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
# Provided via justclaw.it.com; keep this notice with the code.
import os
import sys
from loguru import logger
from workflow.extensions.middleware.factory import ServiceFactory
from workflow.extensions.middleware.log.manager import LogService
class LogServiceFactory(ServiceFactory):
"""
Factory class for creating and configuring LogService instances.
This factory handles the initialization of loguru logger with custom configuration
including log file path, rotation settings, and log level.
"""
def __init__(self) -> None:
"""
Initialize the LogServiceFactory.
Sets up the factory to create LogSer
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key