You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by Mikael Ståldal <mi...@magine.com> on 2017/01/23 15:20:52 UTC

Asynchronously reporting errors from appenders

Is my suggestion here to use StatusLogger the proper way of doing it?

https://issues.apache.org/jira/browse/LOG4J2-1733?focusedCommentId=15834729&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15834729

Since the error is received from an asynchronous callback, it is not
possible to report it back to the application.

(The StatusLogger is thread safe, isn't it?)

-- 
[image: MagineTV]

*Mikael Ståldal*
Senior software developer

*Magine TV*
mikael.staldal@magine.com
Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com

Privileged and/or Confidential Information may be contained in this
message. If you are not the addressee indicated in this message
(or responsible for delivery of the message to such a person), you may not
copy or deliver this message to anyone. In such case,
you should destroy this message and kindly notify the sender by reply
email.

Re: Asynchronously reporting errors from appenders

Posted by Matt Sicker <bo...@gmail.com>.
Being able to configure what to do on asynchronous errors would be useful.
They could report back not only an exception, but possibly even the Message
itself so it could be retried or switched to a failover appender (or
FailoverAppender could be enhanced to handle asynchronous errors itself via
this API).

On 23 January 2017 at 10:08, Matt Sicker <bo...@gmail.com> wrote:

> I proposed an idea here: https://issues.apache.org/jira/browse/LOG4J2-1797
>
> On 23 January 2017 at 09:22, Matt Sicker <bo...@gmail.com> wrote:
>
>> I just added a comment about throwing the exception.
>>
>> StatusLogger is threadsafe, yes.
>>
>> On 23 January 2017 at 09:20, Mikael Ståldal <mi...@magine.com>
>> wrote:
>>
>>> Is my suggestion here to use StatusLogger the proper way of doing it?
>>>
>>> https://issues.apache.org/jira/browse/LOG4J2-1733?focusedCom
>>> mentId=15834729&page=com.atlassian.jira.plugin.system.issuet
>>> abpanels:comment-tabpanel#comment-15834729
>>>
>>> Since the error is received from an asynchronous callback, it is not
>>> possible to report it back to the application.
>>>
>>> (The StatusLogger is thread safe, isn't it?)
>>>
>>> --
>>> [image: MagineTV]
>>>
>>> *Mikael Ståldal*
>>> Senior software developer
>>>
>>> *Magine TV*
>>> mikael.staldal@magine.com
>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>
>>> Privileged and/or Confidential Information may be contained in this
>>> message. If you are not the addressee indicated in this message
>>> (or responsible for delivery of the message to such a person), you may
>>> not copy or deliver this message to anyone. In such case,
>>> you should destroy this message and kindly notify the sender by reply
>>> email.
>>>
>>
>>
>>
>> --
>> Matt Sicker <bo...@gmail.com>
>>
>
>
>
> --
> Matt Sicker <bo...@gmail.com>
>



-- 
Matt Sicker <bo...@gmail.com>

Re: Asynchronously reporting errors from appenders

Posted by Matt Sicker <bo...@gmail.com>.
I proposed an idea here: https://issues.apache.org/jira/browse/LOG4J2-1797

On 23 January 2017 at 09:22, Matt Sicker <bo...@gmail.com> wrote:

> I just added a comment about throwing the exception.
>
> StatusLogger is threadsafe, yes.
>
> On 23 January 2017 at 09:20, Mikael Ståldal <mi...@magine.com>
> wrote:
>
>> Is my suggestion here to use StatusLogger the proper way of doing it?
>>
>> https://issues.apache.org/jira/browse/LOG4J2-1733?focusedCom
>> mentId=15834729&page=com.atlassian.jira.plugin.system.
>> issuetabpanels:comment-tabpanel#comment-15834729
>>
>> Since the error is received from an asynchronous callback, it is not
>> possible to report it back to the application.
>>
>> (The StatusLogger is thread safe, isn't it?)
>>
>> --
>> [image: MagineTV]
>>
>> *Mikael Ståldal*
>> Senior software developer
>>
>> *Magine TV*
>> mikael.staldal@magine.com
>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>
>> Privileged and/or Confidential Information may be contained in this
>> message. If you are not the addressee indicated in this message
>> (or responsible for delivery of the message to such a person), you may
>> not copy or deliver this message to anyone. In such case,
>> you should destroy this message and kindly notify the sender by reply
>> email.
>>
>
>
>
> --
> Matt Sicker <bo...@gmail.com>
>



-- 
Matt Sicker <bo...@gmail.com>

Re: Asynchronously reporting errors from appenders

Posted by Matt Sicker <bo...@gmail.com>.
I just added a comment about throwing the exception.

StatusLogger is threadsafe, yes.

On 23 January 2017 at 09:20, Mikael Ståldal <mi...@magine.com>
wrote:

> Is my suggestion here to use StatusLogger the proper way of doing it?
>
> https://issues.apache.org/jira/browse/LOG4J2-1733?
> focusedCommentId=15834729&page=com.atlassian.jira.
> plugin.system.issuetabpanels:comment-tabpanel#comment-15834729
>
> Since the error is received from an asynchronous callback, it is not
> possible to report it back to the application.
>
> (The StatusLogger is thread safe, isn't it?)
>
> --
> [image: MagineTV]
>
> *Mikael Ståldal*
> Senior software developer
>
> *Magine TV*
> mikael.staldal@magine.com
> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>
> Privileged and/or Confidential Information may be contained in this
> message. If you are not the addressee indicated in this message
> (or responsible for delivery of the message to such a person), you may not
> copy or deliver this message to anyone. In such case,
> you should destroy this message and kindly notify the sender by reply
> email.
>



-- 
Matt Sicker <bo...@gmail.com>