🤖 自动格式化代码 [skip ci]

This commit is contained in:
github-actions[bot]
2025-04-23 14:27:57 +00:00
parent 7438c2dd76
commit b0b05d532b
2 changed files with 5 additions and 7 deletions

View File

@@ -43,9 +43,7 @@ if not SIMPLE_OUTPUT:
"file_level": "DEBUG", "file_level": "DEBUG",
# 格式配置 # 格式配置
"console_format": ( "console_format": (
"<level>{time:YYYY-MM-DD HH:mm:ss}</level> | " "<level>{time:YYYY-MM-DD HH:mm:ss}</level> | <cyan>{extra[module]: <12}</cyan> | <level>{message}</level>"
"<cyan>{extra[module]: <12}</cyan> | "
"<level>{message}</level>"
), ),
"file_format": "{time:YYYY-MM-DD HH:mm:ss} | {level: <8} | {extra[module]: <15} | {message}", "file_format": "{time:YYYY-MM-DD HH:mm:ss} | {level: <8} | {extra[module]: <15} | {message}",
"log_dir": LOG_ROOT, "log_dir": LOG_ROOT,
@@ -451,7 +449,7 @@ def get_module_logger(
sink=sys.stderr, sink=sys.stderr,
level=os.getenv("CONSOLE_LOG_LEVEL", console_level or current_config["console_level"]), level=os.getenv("CONSOLE_LOG_LEVEL", console_level or current_config["console_level"]),
format=current_config["console_format"], format=current_config["console_format"],
filter=lambda record: record["extra"].get("module") == module_name and 'custom_style' not in record['extra'], filter=lambda record: record["extra"].get("module") == module_name and "custom_style" not in record["extra"],
enqueue=True, enqueue=True,
) )
handler_ids.append(console_id) handler_ids.append(console_id)
@@ -470,7 +468,7 @@ def get_module_logger(
retention=current_config["retention"], retention=current_config["retention"],
compression=current_config["compression"], compression=current_config["compression"],
encoding="utf-8", encoding="utf-8",
filter=lambda record: record["extra"].get("module") == module_name and 'custom_style' not in record['extra'], filter=lambda record: record["extra"].get("module") == module_name and "custom_style" not in record["extra"],
enqueue=True, enqueue=True,
) )
handler_ids.append(file_id) handler_ids.append(file_id)