Logging-SIP

Syslog

It is useful to log SIP requests to a separate file especially during initial setup by modifying your syslog config file.

  1. Edit syslog.conf.

    $ sudo vi /etc/syslog.conf  # maybe /etc/rsyslog.conf
  2. Add this:

    local6.*                -/var/log/SIP_evergreen.log
  3. Syslog expects the logfile to exist so create the file.

    $ sudo touch /var/log/SIP_evergreen.log
  4. Restart sysklogd.

    $ sudo /etc/init.d/sysklogd restart

Syslog-NG

  1. Edit logging config.

    sudo vi /etc/syslog-ng/syslog-ng.conf
  2. Add:

    # +SIP2+ for Evergreen
    filter    f_eg_sip { level(warn, err, crit) and facility(local6); };
    destination eg_sip { file("var/log/SIP_evergreen.log"); };
    log { source(s_all); filter(f_eg_sip); destination(eg_sip); };
  3. Syslog-ng expects the logfile to exist so create the file.

    $ sudo touch /var/log/SIP_evergreen.log
  4. Restart syslog-ng

    $ sudo /etc/init.d/syslog-ng restart