[OpenSIPS-Users] Logrotate opensips.log

Zahid Mehmood zm23 at columbia.edu
Tue Mar 10 23:23:31 CET 2009


I use the following on RHEL4, using logrotate, and it works fine.

--

/var/log/openser.log {
    sharedscripts
    postrotate
	/bin/kill -HUP `cat /var/run/syslogd.pid 2>/dev/null` 2>/dev/null || true
    endscript
}

--
Zahid



-----Original Message-----
From: users-bounces at lists.opensips.org [mailto:users-bounces at lists.opensips.org] On Behalf Of Marc Leurent
Sent: Monday, March 09, 2009 6:28 AM
To: users at lists.opensips.org
Subject: [OpenSIPS-Users] Logrotate opensips.log

Hello All,
I'm trying to add logrotate to my opensips.log file without having to restart 
opensips... if it is possible!
Here are my config files. I ask opensips to log to local6 and put it in 
a /var/log/opensips.log file.
When I lanched logrotate /etc/logrotate.d/opensips, logrotate works, and main 
file inode do not change and is truncated, but opensips doensn't log anymore 
in the file.
Have you got any idea how to do it please?

Thanks! 

/etc/opensips/opensips.cfg:
log_facility=LOG_LOCAL6


/etc/syslog.conf:
#log opensips messages to own log
local6.* /var/log/opensips.log

/etc/logrotate.d/opensips:
/var/log/opensips/opensips.log {
        rotate 7
        daily
        compress
        size=500M
        copytruncate
}


-- 
-- --
Marc LEURENT
Ingénieur VoIP

DECKPOINT SA
Une société du groupe VTX Telecom
================================================================
Rue Eugène-Marziano 15 - 1227 Les Acacias
http://www.vtx.ch - marc.leurent at vtx-telecom.ch
----------------------------------------------------------------
VTX, votre partenaire telecom proche de vous !
================================================================

_______________________________________________
Users mailing list
Users at lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



More information about the Users mailing list