Skip to content
This repository was archived by the owner on Jun 16, 2026. It is now read-only.
This repository was archived by the owner on Jun 16, 2026. It is now read-only.

logger filter 默认 crate 名与实际 lib target 不一致 #2

Description

@XiaoPengYouCode

背景

当前 cfg/rbt_cfg.toml 默认配置为:

console_log_filter = "info,auto_aim_rust=debug,ort=warn"
file_log_filter = "info,auto_aim_rust=debug,ort=info"

但当前 lib crate 的实际日志 target 是 lib::...,所以 auto_aim_rust=debug 不会让 lib 内部 debug 日志生效。

依据

logforth_filter_rustlog::RustLogFilter 使用 RUST_LOG 风格规则,按日志 target/module path 前缀匹配;当前测试输出 target 为 lib::rbt_infra::...

建议

二选一:

  1. 将默认配置改成 info,lib=debug,ort=warn / info,lib=debug,ort=info
  2. 统一 crate/package 命名,让日志 target 与配置中的 auto_aim_rust 一致。

验收标准

  • 默认配置下 lib 内部 debug 日志行为符合预期。
  • 配置文件或文档明确说明 filter target 应写实际 crate/module 名。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions