Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I currently have a long running application on an embedded Linux environment and

ID: 658977 • Letter: I

Question

I currently have a long running application on an embedded Linux environment and all debug messages are currently being outputted to stdout using printf. This isn't ideal for special users who actually need to use the terminal.

Is there is a way to output to a pseudo-device file, a custom stderr or some type of unhooked stream so a live stream can be viewed if users decide to open it up in a file viewer or is there a better way to go about this?

I have thought about just logging all the debug messages to a file but I want to avoid an issue if the application is left running for days and days on end and the log file is left to fill up to some unmanageable size.

Explanation / Answer

The usual solution is to log to a file, and to use log rotation. You can implement the rotation yourself, or use a daemon like logrotate.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote