logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ralph Goers <ralph.go...@dslextreme.com>
Subject Re: Logging to Disk in case of only Error
Date Wed, 09 Oct 2013 18:43:01 GMT
Try the FailoverAppender.  See http://logging.apache.org/log4j/2.x/manual/appenders.html#FailoverAppender.


On Oct 9, 2013, at 10:25 AM, Sudharma Puranik <sudharma.puranik@gmail.com> wrote:

> Hello,
> I have a special case of logging, that is , whenever I get an Error I would want to log
to disk. Kind of a Dump log. The approach I have used so far are,
> 1. extend RollingRandomAccessAppender and RandomAccessManager and create my own write
method which will only write to a IO Stream and when error occurs I flush it using ByteBuffer.
But the problem is I am not able to get the hook of Exception handling.
> 2 Tried to write my own NIO streaming with different thread. But handling rollover is
not managable.
> Could you please suggest me a better approach for this?
> -Sudharma

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

View raw message