threefoldtech / info_grid

Apache License 2.0
1 stars 2 forks source link

Farmerbot log management #579

Open scottyeager opened 1 week ago

scottyeager commented 1 week ago

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: