You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-dev@logging.apache.org by "Dominik Psenner (JIRA)" <ji...@apache.org> on 2016/08/24 16:21:20 UTC

[jira] [Closed] (LOG4NET-524) OnlyOnceErrorHandler might cause StackOverflowError

     [ https://issues.apache.org/jira/browse/LOG4NET-524?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dominik Psenner closed LOG4NET-524.
-----------------------------------
    Resolution: Invalid

This is log4net, the bugzilla report is about log4j. Redirected bug report to log4j mailing list.

> 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)

Re: Fwd: [jira] [Closed] (LOG4NET-524) OnlyOnceErrorHandler might cause StackOverflowError

Posted by Dominik Psenner <dp...@gmail.com>.
Big should read as bug, apologies. Typing on the phone aint easy. ;-)

On 24 Aug 2016 6:22 p.m., "Dominik Psenner" <dp...@gmail.com> wrote:

> This big report came in on the wrong channel.
> ---------- Forwarded message ----------
> From: "Dominik Psenner (JIRA)" <ji...@apache.org>
> Date: 24 Aug 2016 6:21 p.m.
> Subject: [jira] [Closed] (LOG4NET-524) OnlyOnceErrorHandler might cause
> StackOverflowError
> To: <lo...@logging.apache.org>
> Cc:
>
>
>      [ https://issues.apache.org/jira/browse/LOG4NET-524?page=com.
> atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
>
> Dominik Psenner closed LOG4NET-524.
> -----------------------------------
>     Resolution: Invalid
>
> This is log4net, the bugzilla report is about log4j. Redirected bug report
> to log4j mailing list.
>
> > 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)
>

Fwd: [jira] [Closed] (LOG4NET-524) OnlyOnceErrorHandler might cause StackOverflowError

Posted by Dominik Psenner <dp...@gmail.com>.
This big report came in on the wrong channel.
---------- Forwarded message ----------
From: "Dominik Psenner (JIRA)" <ji...@apache.org>
Date: 24 Aug 2016 6:21 p.m.
Subject: [jira] [Closed] (LOG4NET-524) OnlyOnceErrorHandler might cause
StackOverflowError
To: <lo...@logging.apache.org>
Cc:


     [ https://issues.apache.org/jira/browse/LOG4NET-524?page=
com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dominik Psenner closed LOG4NET-524.
-----------------------------------
    Resolution: Invalid

This is log4net, the bugzilla report is about log4j. Redirected bug report
to log4j mailing list.

> 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)