Skip to content

Configuring logrotate for Firo's debug.log

justanwar edited this page Dec 1, 2020 · 1 revision

This is a short tutorial on how to setup logrotate to rotate Firo's debug.log. Logrotate is useful to keep the size of debug.log manageable.

This assumes that Firo data directory is in the default location and you are using Ubuntu/Debian. Please modify accordingly.

By default, the debug.log file is stored here together with the blockchain data and firo.conf:

 /home/username/.firo/debug.log

Create the logrotate file with

 sudo nano /etc/logrotate.d/firo

After you have created the file, copy and paste the following lines into it. Press Ctrl+X to save the file and exit nano.

/home/username/.firo/debug.log {
daily
missingok
rotate 28
compress
copytruncate
}

With these settings, the debug.log file will be:

  • rotated daily;
  • will not issue an error if debug.log is missing;
  • rotated for 28 times before being deleted;
  • compresses the rotated files;
  • truncate the original debug.log file to zero bytes after creating a copy.
For more information about logrotate see
 man logrotate
Clone this wiki locally