Skip to content

Dproano/live logs#81

Draft
DanielProano wants to merge 23 commits into
masterfrom
dproano/live_logs
Draft

Dproano/live logs#81
DanielProano wants to merge 23 commits into
masterfrom
dproano/live_logs

Conversation

@DanielProano

Copy link
Copy Markdown

-Added logging, with frames put in a temporary buffer with a set capacity that writes to disk every second or whenever capacity is met.
-Additionally, a new file is created every minute
-logs folder placed under root
-constants added to consts.rs
-extensive unit testing

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds live CAN logging support to the app by buffering incoming frames in-memory and periodically flushing them to disk in a rotating log-file scheme, along with supporting utilities/constants and a comprehensive new unit test suite.

Changes:

  • Introduces a DaqLogger in the CAN thread to buffer RawFrames and write binary log files under a logs/ folder, rotating files on a time threshold.
  • Adds path/time helpers and centralizes timing/logging constants in daq_log_parse::consts.
  • Adds extensive unit tests for logger behavior and wiring, plus tempfile as a dev dependency.

Reviewed changes

Copilot reviewed 7 out of 9 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
src/util.rs Adds helpers for resolving an absolute path and formatting timestamps for filenames.
src/daq_log_parse/parse.rs Makes RawFrame public so it can be written by the logger and validated in tests.
src/daq_log_parse/consts.rs Adds logging/timing constants and log folder path.
src/can/thread.rs Implements DaqLogger and integrates logging into the CAN read loop.
src/can/thread_tests.rs Adds a large suite of logger-focused unit tests using temp directories.
src/can/mod.rs Registers the new test module under cfg(test).
Cargo.toml Adds tempfile as a dev dependency for tests.
Cargo.lock Updates lockfile for the tempfile version bump.
.gitignore Ignores the runtime logs/ directory.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/can/thread.rs Outdated
Comment thread src/can/thread.rs Outdated
Comment thread src/can/thread.rs Outdated
Comment thread src/can/thread.rs Outdated
Comment thread src/can/thread_tests.rs Outdated
Comment thread src/can/thread_tests.rs Outdated
Comment thread src/can/thread_tests.rs Outdated
Comment thread src/can/thread_tests.rs Outdated
@LelsersLasers LelsersLasers self-requested a review June 3, 2026 04:34
Comment thread src/can/thread.rs Outdated
Comment thread src/can/thread.rs Outdated
Comment thread src/can/thread.rs Outdated
Comment thread src/daq_log_parse/consts.rs Outdated
Comment thread src/can/thread.rs Outdated
Comment thread src/can/thread.rs Outdated
Comment thread src/util.rs Outdated
Comment thread src/can/thread_tests.rs Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@DanielProano DanielProano requested review from irvingywang and removed request for irvingywang June 14, 2026 20:25
@LelsersLasers LelsersLasers marked this pull request as draft July 3, 2026 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants