logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fergus Gallagher <Fergus.Gallag...@OrbisUK.com>
Subject Re: Is there any rolling of Log file by date/Number of Days ??
Date Wed, 27 Nov 2002 09:32:06 GMT
If you're on unix

	$ find $LOGDIR -mtime +2 | xargs rm -f

run as a cronjob.


On Wed, Nov 27, 2002 at 02:35:15PM +0530, GOPALA KRISHNA PRABHU wrote:
> Dear Friend
> 
> How can I limit the logging of logs for the last 2 days only...
> and the logs logged older than 2 days should be automatically cleared.
> 
> for example... 
> using the following configuration I can log the latest 3KB data only...other
> older logs are automatically Cleared.
> 
> log4j.rootLogger=DEBUG, A1
> log4j.appender.A1=org.apache.log4j.RollingFileAppender
> log4j.appender.A1.File=temp.txt
> log4j.appender.A1.MaxFileSize=3KB
> log4j.appender.A1.layout=org.apache.log4j.PatternLayout
> log4j.appender.A1.layout.ConversionPattern=%-4r %-5p -- %C- %m%n
> log4j.logger.Log4jLogSample=info
> 
> 
> 
> Thanks in advance.
> G.Gopala krishna Prabhu   
> (gopalak@nestec.net)
> 
> --
> To unsubscribe, e-mail:   <mailto:log4j-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:log4j-user-help@jakarta.apache.org>

-- 
Fergus Gallagher          Tel: +44 (20) 8742 1600
Orbis                     Fax: +44 (20) 8742 2649
414 Chiswick High Street  email: Fergus.Gallagher@orbisuk.com
London  W4 5TL            Web: http://www.orbisuk.com

--
To unsubscribe, e-mail:   <mailto:log4j-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:log4j-user-help@jakarta.apache.org>


Mime
View raw message