You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Ralph Goers (Jira)" <ji...@apache.org> on 2021/06/22 14:56:00 UTC

[jira] [Comment Edited] (LOG4J2-3111) Filter which stops logging if disk space left is lower than a configurable threshold

    [ https://issues.apache.org/jira/browse/LOG4J2-3111?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17367414#comment-17367414 ] 

Ralph Goers edited comment on LOG4J2-3111 at 6/22/21, 2:55 PM:
---------------------------------------------------------------

I have no problem with a PR that implements this. However, if the threshold is exceeded it really should have some ability to send some kind of alert. SNMP? Email? Something else?


was (Author: ralph.goers@dslextreme.com):
I have no problem with a PR that implements this.

> Filter which stops logging if disk space left is lower than a configurable threshold
> ------------------------------------------------------------------------------------
>
>                 Key: LOG4J2-3111
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-3111
>             Project: Log4j 2
>          Issue Type: New Feature
>          Components: Filters
>            Reporter: Adwait Kumar Singh
>            Priority: Minor
>
> This is a common scenario where in case a host's disk is getting full we may prefer to stop secondary responsibilities of a system like logging, to prevent the system from completely crashing.
> I am proposing to add a DiskSpaceCheckingFilter which would take in a minimumDiskSpaceFree percentage threshold and would filter out events if the diskspace is full. We could use the Java File.getUsableSpace and File.getTotalSpace to calculate the disk free percentage, and since these operations are costly they could be run on a separate thread and keep updating a Atomic variable which stores the thresholds, which would be queried on every event.
> Caveats of this Filter (an additional thread, performance impact due to checking a atomic variable etc) can be called out and left up to users discretion to use or not.
> Will raise a PR if this proposal is accepted.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)