baton_debug.log logs every sample, even with nothing connected, and grows without limit

未关闭
#262 0 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

维护者通常 3 天内回复

@Omanhene20 已经在做这个了。

开始于 2026年11月6日。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
56/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
rust
领域
observability

调研方向

Start with the logging calls in xplane_plugin/subprojects/baton/src/lib.rs, especially the locations identified at lines 206 and 259, and trace how the plugin initializes its log in %TEMP%. Check how connection state is available to the send path and how the log file is opened. Done means sample spam is avoided, disconnected samples are not logged individually, and startup rotates the previous log as proposed.

由索引模型根据 Issue 内容生成。

描述

area:xplane-plugin enhancement needs-triage rust

Problem

baton_debug.log (in %TEMP%) gets a line for every sample. send() logs Attempted to send ... at 20 Hz before checking whether anything is connected (xplane_plugin/subprojects/baton/src/lib.rs:259), and the send loop logs Sent: ... again for every sample that does go out (lib.rs:206). The file is appended across X-Plane sessions and never trimmed. It was 1.9 MB on the lab PC after a few short sessions.

This got in the way while diagnosing #254:

  • The handshake failure was buried among thousands of sample lines.
  • Attempted to send lines kept appearing after the connection had already failed, which looked like data flowing.

Proposal

  • Log connection events and errors, not individual samples, or at most a count every few seconds ("sent 100 samples").
  • Do not log a sample at all when there is no connection. Log one line saying samples are being dropped.
  • Start a fresh log each time the plugin starts, keeping the previous one as baton_debug.old.log.
主要语言
Python
星标
4
派生
9
平均合并
4 天 17 小时
30 天内合并 PR
7

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

oss-slu/PilotDataSynchronization 的其他 Issue

查看 oss-slu/PilotDataSynchronization 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。