[logback-dev] WriterAppender.subAppend behaviour in case of IOExceptions
Syvalta
syvalta at yahoo.com
Fri Nov 27 09:26:47 CET 2009
Hi Ceki,
I added an initial patch to http://jira.qos.ch/browse/LBCORE-109. I would
appreciate any feedback.
Ceki Gulcu wrote:
>
> Hello Syvalta,
>
> This is related to issue LBCORE-109 [1]. It would be nice if a
> WriterAppender
> and derivatives could recuperate from a temporary failure.
>
> - Changes can be backward incompatible but within reason.
>
> - Attempts to recuperate from a failure should be done with parsimony. You
> could
> use a backoff mechanism: attempt if N seconds have elapses, in the
> subsequent
> attempt wait for 4*N, and in the third, wait for at least 16*N to elapse,
> and so
> forth until you reach 30 minutes as a maximum delay between attempts.
>
> - Do not do any buffering. If you do, you are likely to cause the
> applicaion to
> crash with OutOfMemoryException if there is no limit to the size of the
> buffer
> and it the buffer has a limit, then you can't guarantee that events won't
> be
> lost. It's way too much hassle for little benefit.
>
> - The patch would likely be accepted if it is easy to understand, if it
> has test
> cases and all existing test cases continue to pass.
>
> HTH,
>
> [1] http://jira.qos.ch/browse/LBCORE-109
>
--
View this message in context: http://old.nabble.com/WriterAppender.subAppend-behaviour-in-case-of-IOExceptions-tp25874122p26536544.html
Sent from the Logback Dev mailing list archive at Nabble.com.
More information about the logback-dev
mailing list