User Tools

Site Tools


tutorials:3.2.x:syslog

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Last revision Both sides next revision
tutorials:3.2.x:syslog [2011/12/20 11:41]
85.178.76.94 [Kamailio with Syslog and Log Rotate]
tutorials:3.2.x:syslog [2011/12/20 16:57]
85.178.76.94 [Log Rotate]
Line 75: Line 75:
 Otherwise, add the piece of config above in **/etc/logrotate.conf**. Otherwise, add the piece of config above in **/etc/logrotate.conf**.
  
 +For **syslog-ng** the appropriate pid file has to be used, should be like:
 +
 +<code>
 +/var/log/kamailio.log {
 +    missingok
 +    size=50M
 +    create 0644 root root
 +    postrotate
 +    /bin/kill -HUP `cat /var/run/syslog-ng.pid 2> /dev/null` 2> /dev/null || true
 +    endscript
 +}
 +</code>
 +
 +You can test the existence of pid files before using kill, like:
 +
 +<code>
 +    if [ -f /var/run/syslog-ng.pid ]; then    \
 +        kill -HUP `cat /var/run/syslog-ng.pid`; \
 +    fi;
 +</code>
tutorials/3.2.x/syslog.txt ยท Last modified: 2022/03/23 09:55 by miconda