As time goes on, the farmerbot log file will grow rather large. This makes it difficult to work with, and can eventually become a concern of taking up too much disk space So it would be nice to add some info on strategies for managing the logs.
One simple suggestion is just copying the latest entries from the log file into a new file. This can be useful for log review or for sharing logs when older entries are not relevant. Here's an example command to copy the latest 1000 lines into a new file:
tail -n 1000 farmerbot.log > farmerbot-recent.log
Beyond that, it would be nice to present some ways of rotating the log file to keep its size down. Some ideas to explore:
Using the logrotate service
Sending the logs into journald instead of sending them directly to a file, then using journald methods for log rotation (vacuum). This would also require providing additional docs on how to view and share these logs, since they would no longer be in an easily accessible file
As time goes on, the farmerbot log file will grow rather large. This makes it difficult to work with, and can eventually become a concern of taking up too much disk space So it would be nice to add some info on strategies for managing the logs.
One simple suggestion is just copying the latest entries from the log file into a new file. This can be useful for log review or for sharing logs when older entries are not relevant. Here's an example command to copy the latest 1000 lines into a new file:
Beyond that, it would be nice to present some ways of rotating the log file to keep its size down. Some ideas to explore:
logrotate
servicejournald
instead of sending them directly to a file, then usingjournald
methods for log rotation (vacuum). This would also require providing additional docs on how to view and share these logs, since they would no longer be in an easily accessible file