Change Log File Example

This page shows an example of changing log file from customers.

They moves the OpenSIPS logs from /var/log/messages to /var/log/opensips/opensips.log

  1. opensips.cfg:

opensips.cfg

  1. rsyslog.conf:

rsyslog.conf

rsyslog.conf

  1. Logrotate:

logrotate

Note: In this example, log files of last 120 days are kept. It may cause disk space issues. Normally, the size of one OpenSIPS log file including the log messages of one day may reach 2G bytes before compressing.