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.

[P2] rbt_log.rs: 注释与文件滚动行为不一致 #5

Description

@XiaoPengYouCode

问题

lib/src/rbt_infra/rbt_log.rs 第 29 行注释写文件日志按小时自动滚动,但代码中 FileBuilder 未调用 .rollover_hourly()

当前实际行为:每次启动按当前时间戳创建新文件(如 log/2026/06/08/17:13:31),进程跨小时后不会自动换文件。FileBuilder 默认是 Rotation::Never

修法

  • 方案 A(推荐):用稳定文件名(如 "auto_aim")+ .rollover_hourly(),文件自动滚动命名为 auto_aim.2026-06-08-17
  • 方案 B:如果当前行为就是想要的,改注释,别误导后续维护者

位置

lib/src/rbt_infra/rbt_log.rs:29FileBuilder::new(directory_name, file_name) 调用处

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions