Francois,

Great, I just did not see that in the documentation anywhere. The log
rotate script seems to work perfectly. Thanks!

 _
/-\ ndrew

On Mon, Oct 18, 2010 at 7:17 AM, Francois Gaudreault
<[email protected]> wrote:
>  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)
>
>



-- 
 _
/-\ ndrew Niemantsverdriet
Academic Computing
(406) 238-7360
Rocky Mountain College
1511 Poly Dr.
Billings MT, 59102

------------------------------------------------------------------------------
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