Skip to content

Dproano/clean live logs - #89

Open
DanielProano wants to merge 6 commits into
masterfrom
dproano/clean_live_logs
Open

Dproano/clean live logs#89
DanielProano wants to merge 6 commits into
masterfrom
dproano/clean_live_logs

Conversation

@DanielProano

Copy link
Copy Markdown

No description provided.

@LelsersLasers
LelsersLasers self-requested a review July 25, 2026 03:52
Comment thread src/can/thread.rs
@LelsersLasers
LelsersLasers self-requested a review July 27, 2026 17:46

@LelsersLasers LelsersLasers left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

couple small comments, mostly focused on the case of deleting the logs folder while daqapp is still running

Comment thread src/can/daq_parser.rs
self.add_frame(raw_frame);
}

pub fn log_canfd_frame(&mut self, _frame: &slcan::CanFdFrame, _is_bus_1: bool) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can prob just delete this if it doesn't do anything and we don't intend to support CAN FD

Comment thread src/can/daq_parser.rs
let file_path = self.folder_path.join(filename);
match File::create(&file_path) {
Ok(f) => self.file = Some(f),
Err(e) => {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

this can fail b/c the top level logs folder got deleted
I think before creating the file you should re-call make all dirs? (and confirm that making the dirs doesn't fail if they already exist?)

Comment thread src/can/daq_parser.rs
}
}

if let Some(ref mut file) = self.file {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

this section also sometimes does not intuitive things when you delete the log folder. I can see it being common for us to delete the whole logs/ folder when we are done bench testing something but then we don't close/reopen daqapp.

unsure off the top of my head the best solution, but if the file got deleted, it needs to end up remaking the folders + remaking the file

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.

2 participants