Sirportly logs

Sirportly stores of all its application logs within the log directory, in the root of your Sirportly installation directory. Logs are stored indefinitely by default, but if you want to compress or back them up, we recommend using logrotate on your server to automate the process of rotating logs.

To set up a log rotation config for Sirportly, you'll need to create a new file within /etc/logrotate.d/ - /etc/logrotate.d/sirportly.

The following example configuration is recommended, assuming your log directory is located within /opt/sirportly/log.

/opt/sirportly/log/*.log {
  daily // log file are rotated every day
  missingok // this ignores errors relating to a log file being missing and moves onto the next log file
  rotate 7 // this rotates the log files 7 times before being removed
  compress // old versions of log file are compressed
  delaycompress // this postpones the compression of the previous log file until the next rotation cycle.
  notifempty // this wont rotate the log file if its empty
  copytruncate // this truncates the original log file to zero size, in place after creating a copy of it

In essence, this configuration keeps logs for a total of 7 days, while rotating log files that contain data on a daily basis.

More information about logrotate can be found in Ubuntu's online manual, but it can be used on all Linux based distributions that are suitable for Sirportly.