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

Đang mở
#262 0 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 3 ngày

@Omanhene20 đang làm issue này rồi.

Từ ngày 6/11/2026.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
56/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
rust
Lĩnh vực
observability

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.
Ngôn ngữ chính
Python
Star
4
Fork
9
Merge trung bình
4 ngày 17 giờ
Pull request đã merge (30 ngày)
7

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của oss-slu/PilotDataSynchronization

Tất cả issue của oss-slu/PilotDataSynchronization

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.