There's the FailoverAppender < http://logging.apache.org/log4j/2.x/manual/appenders.html#FailoverAppender> that gives you a way to automatically switch to a different appender when the primary one errs.
On 29 October 2015 at 12:21, degenaro <[email protected]> wrote: > We use log4j with rolling appenders for daemons that run 24x7. The daemons > run as a user on linux and the log files are written to a filesystem that > has a quota. Normally this works great. Once in a while (usually due to > human error) the quota is exceeded. This, unfortunately, prevents the > daemons from writing their logs...worst of all silently. There is no > indication that anything is wrong! > > So my question is: how do we configure log4j so that when logging (to file) > fails the daemon can find out and take appropriate action? > > > > -- > View this message in context: > http://apache-logging.6191.n7.nabble.com/how-to-detect-logger-is-unable-to-write-to-file-tp59123.html > Sent from the Log4j - Users mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > -- Matt Sicker <[email protected]>
