setup_logging

Function setup_logging 

Source
pub(crate) fn setup_logging(
    default_level: &str,
    audit_path: Option<&Path>,
) -> Result<Option<WorkerGuard>>
Expand description

初始化 stderr 日志 + 可选 audit JSONL 层

  • 常规事件走 stderr(no-ansi,因为 MCP client 的 stderr 往往不是 tty)
  • 如果 audit_path 传了,加一个 target=futu_audit 的 JSON 层写到文件/目录