You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by joseheitor <jo...@heitorprojects.com> on 2011/04/04 11:04:50 UTC

'Rolling' Single Log File

Is it possible to log to a single log file with a size limit, which when the
size limit is reached, the oldest entries get automatically removed as it
adds new log events?
-- 
View this message in context: http://old.nabble.com/%27Rolling%27-Single-Log-File-tp31312523p31312523.html
Sent from the Log4j - Users mailing list archive at Nabble.com.


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


Re: 'Rolling' Single Log File

Posted by "Mikhail T." <mi...@aldan.algebra.com>.
On 04.04.2011 05:04, joseheitor wrote:
> Is it possible to log to a single log file with a size limit, which when the
> size limit is reached, the oldest entries get automatically removed as it
> adds new log events?
No filesystem allows such removal of beginning of a file, so the answer 
is a no.

If you were logging to a database's table, you could do something like 
this, but plain file -- no.

    -mi


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