You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@logging.apache.org by Gary Gregory <ga...@gmail.com> on 2020/05/18 21:22:34 UTC

[log4j] Disable logging when disk space is low

Hi All:

I have cases where our consultants at work want to turn on debug logging to
help diagnose issues for long running tasks but... they do not want to
crash a machine by making it run out of disk space.

Do we foresee a FileAppender feature to disable logging if disk space falls
below a certain threshold?

It looks like we can do something like that using a rolling file appender
with rollover strategy combined with a size-based triggering policy? So
we'd keep on logging "in a circle" over the same files?

Gary

Re: [log4j] Disable logging when disk space is low

Posted by Ralph Goers <ra...@dslextreme.com>.
It seems like you should be able to use a DeleteAction to make sure there is always enough free space.

Ralph

> On May 18, 2020, at 2:22 PM, Gary Gregory <ga...@gmail.com> wrote:
> 
> Hi All:
> 
> I have cases where our consultants at work want to turn on debug logging to
> help diagnose issues for long running tasks but... they do not want to
> crash a machine by making it run out of disk space.
> 
> Do we foresee a FileAppender feature to disable logging if disk space falls
> below a certain threshold?
> 
> It looks like we can do something like that using a rolling file appender
> with rollover strategy combined with a size-based triggering policy? So
> we'd keep on logging "in a circle" over the same files?
> 
> Gary