[prev in list] [next in list] [prev in thread] [next in thread]
List: log4net-dev
Subject: [jira] [Assigned] (LOG4NET-524) OnlyOnceErrorHandler might cause StackOverflowError
From: "Dominik Psenner (JIRA)" <jira () apache ! org>
Date: 2016-08-24 16:20:20
Message-ID: JIRA.12999702.1472052602000.398489.1472055620680 () Atlassian ! JIRA
[Download RAW message or body]
[ https://issues.apache.org/jira/browse/LOG4NET-524?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel \
]
Dominik Psenner reassigned LOG4NET-524:
---------------------------------------
Assignee: Dominik Psenner
> OnlyOnceErrorHandler might cause StackOverflowError
> ---------------------------------------------------
>
> Key: LOG4NET-524
> URL: https://issues.apache.org/jira/browse/LOG4NET-524
> Project: Log4net
> Issue Type: Bug
> Components: Core
> Affects Versions: 1.2.15
> Reporter: Marc Theisen
> Assignee: Dominik Psenner
>
> I am referring to the solution in \
> https://bz.apache.org/bugzilla/show_bug.cgi?id=42151. I am suggesting another \
> approach instead of placing a bad hack into \
> com.{{csfb.fao.carat.util.file.LoggingOutputStream}}. Why not change the {{error}} \
> method of class {{OnlyOnceErrorHandler}} from {code}
> public void error(String message, Exception e, int errorCode, LoggingEvent event)
> {
> if (e instanceof InterruptedIOException || e instanceof InterruptedException)
> {
> Thread.currentThread().interrupt();
> }
> if(firstTime)
> {
> LogLog.error(message, e);
> firstTime = false; // yikes, too late if stdout/stderr has been
> } // redirected
> }
> {code}
> to
> {code}
> public void error(String message, Exception e, int errorCode, LoggingEvent event)
> {
> if (e instanceof InterruptedIOException || e instanceof InterruptedException)
> {
> Thread.currentThread().interrupt();
> }
> if(firstTime)
> {
> firstTime = false;
> LogLog.error(message, e);
> }
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic