deerflow-code/offline-backend-20260512/backend/packages/harness/deerflow/config/y_log_config.py
2026-09-07 18:24:55 +08:00

21 lines
789 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"""操作日志(Y-Log)上报配置。
前端经公开只读接口 ``GET /api/public/config/y-log`` 读取本段(地址 + 开关),
据此决定是否把用户的关键操作上报到外部日志接口。段内只有地址与开关,无密钥,
公开只读。仿 :mod:`deerflow.config.log_system_config` 的写法。
"""
from __future__ import annotations
from pydantic import BaseModel, Field
class YLogConfig(BaseModel):
"""操作日志(Y-Log)上报配置:前端经 /api/public/config/y-log 读取。"""
enabled: bool = Field(default=False, description="是否启用操作日志上报")
write_url: str = Field(
default="",
description="日志上报外部接口完整地址(POST),如 https://ch1.b.uat.4.cn/api/y-log/write",
)