How to rotate logs to keep file system from getting full

From RidgeRun Developer Connection
Jump to: navigation, search


On embedded systems, if the kernel or an application is writing to a log file located in persistent (NAND or SD card for example), then eventually the file system will get full. To keep this from happening, you can rotate the logs, with older log files automatically being deleted.

Kernel message logging

Application output logging

You can redirect the output from any application to the /var/log/messages log file by starting the application as follows:

Rotating logs