logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Philip Denno" <pde...@tsi.bc.ca>
Subject RE: Preventing File Append using log4j
Date Thu, 27 Oct 2005 20:26:30 GMT
I guess if you also set the max size on the file to some small number it
would roll after 1 entry.

Example:

	MaxFileSize=0.1MB

This means after the file gets to 100 KB it would roll and since your
max backups is set to zero it would overwrite.

You might be better served by simply implementing your own logging for
the connection pool and avoiding these kinds of hacks.

Cheers,
Philip.

-----Original Message-----
From: James Stauffer [mailto:stauffer.james@gmail.com] 
Sent: October 27, 2005 7:43 AM
To: Log4J Users List
Subject: Re: Preventing File Append using log4j


Look at the rolling file appenders.  One of them has the option of
specifying the max backups.  If you set the max to 0 you would probably
be close to what you want.

On 10/26/05, Gerard Menezes <gbm@qad.com> wrote:
> For an application, I need to log the Connection Pool status 
> periodically, every minute in a log file.  I dont want to maintain a 
> history of the log. So every minute, the log entry will replace the 
> previous one, and so at any point of time, there should be just one 
> entry in the log file.

--
James Stauffer
Are you good? Take the test at http://www.livingwaters.com/good/

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Mime
View raw message