Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add better logging for production #105

Open
ewc340 opened this issue May 10, 2021 · 1 comment
Open

Add better logging for production #105

ewc340 opened this issue May 10, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@ewc340
Copy link
Collaborator

ewc340 commented May 10, 2021

Many problems we have seen in production (i.e. connection issues etc) are hard to debug because we don't have clear logs in the code, we should add logging for crucial parts in the code and save them to a file. We can also add a log view somewhere in Dawn so the logs can be easily accessible.

We may have to do some log sanitation for existing logs since current logs are pretty noisy and repetitive. (Related issue: #65)

@ewc340 ewc340 added the enhancement New feature or request label May 10, 2021
@benliao1
Copy link

benliao1 commented Jul 8, 2021

To prevent another situation like what happened in the last match in spring comp 2021 (we couldn't figure out what time a robot failed), it would be great if Dawn saved a copy of the logs it received from the robot locally somewhere in the application data and maybe deleted the logs once every week or once a day or something so that the file doesn't get too big. Currently, the behavior is simply to print out all logs received from the robot into the console window only if it's open; and if the console window is closed, all received logs are lost to the ether even after re-opening the console window.

Additionally, we could have a menu option (like perhaps Debug -> View Robot Logs) that allows students to access both the logs sent to the robot over the past day or week that are stored on the student's machine (which are log level INFO and above) as well as the logs stored on the robot for all time (which are log level WARN and above). The robot logs are stored on the Raspberry Pi at /home/pi/runtime/logger/runtime.log, so to get the information, just scp the file off of the robot and display it in a new window, similar to the way the "Download Code From Robot" button currently works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants