Andrew,

Yes there are.  I can see two options right away :
- Using logrotate (Linux daemon)
- Using log4perl

Logrotate
There is a script already provided in /usr/local/pf/addons named 
logrotate.  It is already configured to do a basic logrotation every week.

log4perl
Since PF is using log4perl (like log4j), you can use the 
Log::Dispatcher::FileRotate appender.  This is a bit more complicated to 
setup, and you will need to download some perl packages from RPMForge.  
If you want to go this way, here are the packages to dowload, and a 
basic log4perl configuration (/usr/local/pf/conf/log.conf) :

Packages
yum install perl-Date-Manip perl-Log-Dispatch perl-Log-Dispatch-FileRotate

log.conf
log4perl.appender.LOGFILE=Log::Dispatch::FileRotate
log4perl.appender.LOGFILE.filename=/usr/local/pf/logs/packetfence.log
log4perl.appender.LOGFILE.mode=append
log4perl.appender.LOGFILE.autoflush=1
log4perl.appender.LOGFILE.size=51200000
log4perl.appender.LOGFILE.max=5
log4perl.appender.LOGFILE.layout=PatternLayout
log4perl.appender.LOGFILE.layout.ConversionPattern=%d{MMM dd HH:mm:ss} 
%X{proc}(%X{tid}) %p: %m (%M)%n

Enjoy!

On 10-10-15 4:48 PM, Andrew Niemantsverdriet wrote:
> Is there a way built into packetfence to rotate the packetfence log?
>
> Thanks,

-- 
Francois Gaudreault
[email protected]  ::  +1.514.447.4918 ::  www.inverse.ca
Inverse inc. :: Leaders behind SOGo (www.sogo.nu) and PacketFence 
(www.packetfence.org)


------------------------------------------------------------------------------
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly 
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev
_______________________________________________
Packetfence-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/packetfence-users

Reply via email to