How does Pritunl handle log rotation?

I’ve set up a Pritunl VPN that has been running for about 2 weeks now. Out of curiosity, I decided to check how the logs are rotated but couldn’t find anything related to that in the docs.

It seems that my logs are rotating in some way, as I have the following files inside the /var/log directory:

  • pritunl.log
  • pritunl.log.1
  • pritunl_journal.log
  • pritunl_journal.log.1
  • pritunl_journal.log.2
  • pritunl_journal.log.3
  • pritunl_journal.log.4
  • pritunl_journal.log.5

My first thought was some logrotate script but, upon examining the /etc/logrotate.d directory, the only configured rotation that I found was for rotating mongodb logs.

/var/log/mongodb/*.log {
  rotate 60

How are the pritunl logs rotated? How can I tweak this log rotation?

All of the log rotation is done from the server code. The pritunl.log is rotated at 1000000 bytes to 2 rotating files, this cannot be changed. The auditing journal is rotated at 1000000 bytes configurable with the command sudo pritunl set app.journal_rotate_size 1000000 to 6 files. The number of log files cannot be changed.

1 Like