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 2015/06/16 15:01:29 UTC

AsyncAppender and dynamically created appender

Is is possible to have the delegate(s) of AsyncAppender created
dynamically, just like the delegates of RoutingAppender?

-- 
[image: MagineTV]

 *Mikael Ståldal*
Senior backend developer

 *Magine TV*
 mikael.staldal@magine.com
 Regeringsgatan 25  | 111 53 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: AsyncAppender and dynamically created appender

Posted by Mikael Ståldal <mi...@magine.com>.
Let's consider https://issues.apache.org/jira/browse/LOG4J2-1043 to be a
request for that

On Wed, Jun 17, 2015 at 3:59 PM, Ralph Goers <ra...@dslextreme.com>
wrote:

> That seems like a reasonable approach to me.  Those appenders should only
> stop when the background thread stops.
>
> Ralph
>
> On Jun 17, 2015, at 12:52 AM, Mikael Ståldal <mi...@magine.com>
> wrote:
>
> Would it make sense to allow AsyncAppender to have dynamically created
> delegate appenders (and not only AppenderRefs)? And initialize those
> delegate appenders in AsyncAppender's background thread?
>
> On Wed, Jun 17, 2015 at 9:50 AM, Mikael Ståldal <mikael.staldal@magine.com
> > wrote:
>
>> Yes, this is related to an appender hanging or throwing an exception on
>> start up.
>>
>> On Tue, Jun 16, 2015 at 7:41 PM, Gary Gregory <ga...@gmail.com>
>> wrote:
>>
>>> Mikael,
>>>
>>> Is this related to an appender hanging or throwing an (unchecked)
>>> exception on start up?
>>>
>>> Gary
>>>
>>> On Tue, Jun 16, 2015 at 10:27 AM, Ralph Goers <
>>> ralph.goers@dslextreme.com> wrote:
>>>
>>>> The Appenders used by the AsyncAppender are known at configuration
>>>> time. So starting and stopping them in conjunction when the configuration
>>>> is initialized makes sense (and makes managing them easier).  The Appenders
>>>> created by the RoutingAppender are dynamic - the number of them and their
>>>> configuration is not completely known at configuration time.  They are
>>>> created based upon the events that are being processed. This makes managing
>>>> them a bit harder.
>>>>
>>>> Note that when FileConfigurationMonitor detects a configuration change
>>>> it starts a new Thread to perform the reconfiguration, so I am not sure
>>>> what you are hoping to gain by configuring Appenders asynchronously.
>>>>
>>>> Ralph
>>>>
>>>>
>>>> On Jun 16, 2015, at 7:17 AM, Mikael Ståldal <mi...@magine.com>
>>>> wrote:
>>>>
>>>> I want to create / initializte the delegates of an AsyncAppender
>>>> asynchronously, to protect the application from exceptions and delays in
>>>> delegate appender initialization. Is that possible with routing appender?
>>>>
>>>> (See https://issues.apache.org/jira/browse/LOG4J2-1043 )
>>>>
>>>> On Tue, Jun 16, 2015 at 3:25 PM, Remko Popma <re...@gmail.com>
>>>> wrote:
>>>>
>>>>> You could have a routing appender as the delegate of an async appender.
>>>>>
>>>>> On Tue, Jun 16, 2015 at 10:01 PM, Mikael Ståldal <
>>>>> mikael.staldal@magine.com> wrote:
>>>>>
>>>>>> Is is possible to have the delegate(s) of AsyncAppender created
>>>>>> dynamically, just like the delegates of RoutingAppender?
>>>>>>
>>>>>> --
>>>>>> [image: MagineTV]
>>>>>>
>>>>>>  *Mikael Ståldal*
>>>>>> Senior backend developer
>>>>>>
>>>>>>  *Magine TV*
>>>>>>  mikael.staldal@magine.com
>>>>>>  Regeringsgatan 25  | 111 53 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.
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> [image: MagineTV]
>>>>
>>>>  *Mikael Ståldal*
>>>> Senior backend developer
>>>>
>>>>  *Magine TV*
>>>>  mikael.staldal@magine.com
>>>>  Regeringsgatan 25  | 111 53 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.
>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>>> Java Persistence with Hibernate, Second Edition
>>> <http://www.manning.com/bauer3/>
>>> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
>>> Spring Batch in Action <http://www.manning.com/templier/>
>>> Blog: http://garygregory.wordpress.com
>>> Home: http://garygregory.com/
>>> Tweet! http://twitter.com/GaryGregory
>>>
>>
>>
>>
>> --
>> [image: MagineTV]
>>
>>  *Mikael Ståldal*
>> Senior backend developer
>>
>>  *Magine TV*
>>  mikael.staldal@magine.com
>>  Regeringsgatan 25  | 111 53 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.
>>
>
>
>
> --
> [image: MagineTV]
>
>  *Mikael Ståldal*
> Senior backend developer
>
>  *Magine TV*
>  mikael.staldal@magine.com
>  Regeringsgatan 25  | 111 53 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.
>
>
>


-- 
[image: MagineTV]

 *Mikael Ståldal*
Senior backend developer

 *Magine TV*
 mikael.staldal@magine.com
 Regeringsgatan 25  | 111 53 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: AsyncAppender and dynamically created appender

Posted by Ralph Goers <ra...@dslextreme.com>.
That seems like a reasonable approach to me.  Those appenders should only stop when the background thread stops.

Ralph

> On Jun 17, 2015, at 12:52 AM, Mikael Ståldal <mi...@magine.com> wrote:
> 
> Would it make sense to allow AsyncAppender to have dynamically created delegate appenders (and not only AppenderRefs)? And initialize those delegate appenders in AsyncAppender's background thread?
> 
> On Wed, Jun 17, 2015 at 9:50 AM, Mikael Ståldal <mikael.staldal@magine.com <ma...@magine.com>> wrote:
> Yes, this is related to an appender hanging or throwing an exception on start up.
> 
> On Tue, Jun 16, 2015 at 7:41 PM, Gary Gregory <garydgregory@gmail.com <ma...@gmail.com>> wrote:
> Mikael,
> 
> Is this related to an appender hanging or throwing an (unchecked) exception on start up?
> 
> Gary
> 
> On Tue, Jun 16, 2015 at 10:27 AM, Ralph Goers <ralph.goers@dslextreme.com <ma...@dslextreme.com>> wrote:
> The Appenders used by the AsyncAppender are known at configuration time. So starting and stopping them in conjunction when the configuration is initialized makes sense (and makes managing them easier).  The Appenders created by the RoutingAppender are dynamic - the number of them and their configuration is not completely known at configuration time.  They are created based upon the events that are being processed. This makes managing them a bit harder.
> 
> Note that when FileConfigurationMonitor detects a configuration change it starts a new Thread to perform the reconfiguration, so I am not sure what you are hoping to gain by configuring Appenders asynchronously. 
> 
> Ralph
> 
> 
>> On Jun 16, 2015, at 7:17 AM, Mikael Ståldal <mikael.staldal@magine.com <ma...@magine.com>> wrote:
>> 
>> I want to create / initializte the delegates of an AsyncAppender asynchronously, to protect the application from exceptions and delays in delegate appender initialization. Is that possible with routing appender?
>> 
>> (See https://issues.apache.org/jira/browse/LOG4J2-1043 <https://issues.apache.org/jira/browse/LOG4J2-1043> )
>> 
>> On Tue, Jun 16, 2015 at 3:25 PM, Remko Popma <remko.popma@gmail.com <ma...@gmail.com>> wrote:
>> You could have a routing appender as the delegate of an async appender.
>> 
>> On Tue, Jun 16, 2015 at 10:01 PM, Mikael Ståldal <mikael.staldal@magine.com <ma...@magine.com>> wrote:
>> Is is possible to have the delegate(s) of AsyncAppender created dynamically, just like the delegates of RoutingAppender?
>> 
>> -- 
>>  
>> 
>> Mikael Ståldal
>> Senior backend developer 
>> 
>> Magine TV
>> mikael.staldal@magine.com <ma...@magine.com>    
>> Regeringsgatan 25  | 111 53 Stockholm, Sweden  |   www.magine.com  <http://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.   
>> 
>> 
>> 
>> 
>> -- 
>>  
>> 
>> Mikael Ståldal
>> Senior backend developer 
>> 
>> Magine TV
>> mikael.staldal@magine.com <ma...@magine.com>    
>> Regeringsgatan 25  | 111 53 Stockholm, Sweden  |   www.magine.com  <http://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.   
> 
> 
> 
> 
> -- 
> E-Mail: garydgregory@gmail.com <ma...@gmail.com> | ggregory@apache.org  <ma...@apache.org>
> Java Persistence with Hibernate, Second Edition <http://www.manning.com/bauer3/>
> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
> Spring Batch in Action <http://www.manning.com/templier/>
> Blog: http://garygregory.wordpress.com <http://garygregory.wordpress.com/> 
> Home: http://garygregory.com/ <http://garygregory.com/>
> Tweet! http://twitter.com/GaryGregory <http://twitter.com/GaryGregory>
> 
> 
> -- 
>  
> 
> Mikael Ståldal
> Senior backend developer 
> 
> Magine TV
> mikael.staldal@magine.com <ma...@magine.com>    
> Regeringsgatan 25  | 111 53 Stockholm, Sweden  |   www.magine.com  <http://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.   
> 
> 
> 
> -- 
>  
> 
> Mikael Ståldal
> Senior backend developer 
> 
> Magine TV
> mikael.staldal@magine.com <ma...@magine.com>    
> Regeringsgatan 25  | 111 53 Stockholm, Sweden  |   www.magine.com  <http://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: AsyncAppender and dynamically created appender

Posted by Mikael Ståldal <mi...@magine.com>.
Would it make sense to allow AsyncAppender to have dynamically created
delegate appenders (and not only AppenderRefs)? And initialize those
delegate appenders in AsyncAppender's background thread?

On Wed, Jun 17, 2015 at 9:50 AM, Mikael Ståldal <mi...@magine.com>
wrote:

> Yes, this is related to an appender hanging or throwing an exception on
> start up.
>
> On Tue, Jun 16, 2015 at 7:41 PM, Gary Gregory <ga...@gmail.com>
> wrote:
>
>> Mikael,
>>
>> Is this related to an appender hanging or throwing an (unchecked)
>> exception on start up?
>>
>> Gary
>>
>> On Tue, Jun 16, 2015 at 10:27 AM, Ralph Goers <ralph.goers@dslextreme.com
>> > wrote:
>>
>>> The Appenders used by the AsyncAppender are known at configuration time.
>>> So starting and stopping them in conjunction when the configuration is
>>> initialized makes sense (and makes managing them easier).  The Appenders
>>> created by the RoutingAppender are dynamic - the number of them and their
>>> configuration is not completely known at configuration time.  They are
>>> created based upon the events that are being processed. This makes managing
>>> them a bit harder.
>>>
>>> Note that when FileConfigurationMonitor detects a configuration change
>>> it starts a new Thread to perform the reconfiguration, so I am not sure
>>> what you are hoping to gain by configuring Appenders asynchronously.
>>>
>>> Ralph
>>>
>>>
>>> On Jun 16, 2015, at 7:17 AM, Mikael Ståldal <mi...@magine.com>
>>> wrote:
>>>
>>> I want to create / initializte the delegates of an AsyncAppender
>>> asynchronously, to protect the application from exceptions and delays in
>>> delegate appender initialization. Is that possible with routing appender?
>>>
>>> (See https://issues.apache.org/jira/browse/LOG4J2-1043 )
>>>
>>> On Tue, Jun 16, 2015 at 3:25 PM, Remko Popma <re...@gmail.com>
>>> wrote:
>>>
>>>> You could have a routing appender as the delegate of an async appender.
>>>>
>>>> On Tue, Jun 16, 2015 at 10:01 PM, Mikael Ståldal <
>>>> mikael.staldal@magine.com> wrote:
>>>>
>>>>> Is is possible to have the delegate(s) of AsyncAppender created
>>>>> dynamically, just like the delegates of RoutingAppender?
>>>>>
>>>>> --
>>>>> [image: MagineTV]
>>>>>
>>>>>  *Mikael Ståldal*
>>>>> Senior backend developer
>>>>>
>>>>>  *Magine TV*
>>>>>  mikael.staldal@magine.com
>>>>>  Regeringsgatan 25  | 111 53 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.
>>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> [image: MagineTV]
>>>
>>>  *Mikael Ståldal*
>>> Senior backend developer
>>>
>>>  *Magine TV*
>>>  mikael.staldal@magine.com
>>>  Regeringsgatan 25  | 111 53 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.
>>>
>>>
>>>
>>
>>
>> --
>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>> Java Persistence with Hibernate, Second Edition
>> <http://www.manning.com/bauer3/>
>> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
>> Spring Batch in Action <http://www.manning.com/templier/>
>> Blog: http://garygregory.wordpress.com
>> Home: http://garygregory.com/
>> Tweet! http://twitter.com/GaryGregory
>>
>
>
>
> --
> [image: MagineTV]
>
>  *Mikael Ståldal*
> Senior backend developer
>
>  *Magine TV*
>  mikael.staldal@magine.com
>  Regeringsgatan 25  | 111 53 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.
>



-- 
[image: MagineTV]

 *Mikael Ståldal*
Senior backend developer

 *Magine TV*
 mikael.staldal@magine.com
 Regeringsgatan 25  | 111 53 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: AsyncAppender and dynamically created appender

Posted by Mikael Ståldal <mi...@magine.com>.
Yes, this is related to an appender hanging or throwing an exception on
start up.

On Tue, Jun 16, 2015 at 7:41 PM, Gary Gregory <ga...@gmail.com>
wrote:

> Mikael,
>
> Is this related to an appender hanging or throwing an (unchecked)
> exception on start up?
>
> Gary
>
> On Tue, Jun 16, 2015 at 10:27 AM, Ralph Goers <ra...@dslextreme.com>
> wrote:
>
>> The Appenders used by the AsyncAppender are known at configuration time.
>> So starting and stopping them in conjunction when the configuration is
>> initialized makes sense (and makes managing them easier).  The Appenders
>> created by the RoutingAppender are dynamic - the number of them and their
>> configuration is not completely known at configuration time.  They are
>> created based upon the events that are being processed. This makes managing
>> them a bit harder.
>>
>> Note that when FileConfigurationMonitor detects a configuration change it
>> starts a new Thread to perform the reconfiguration, so I am not sure what
>> you are hoping to gain by configuring Appenders asynchronously.
>>
>> Ralph
>>
>>
>> On Jun 16, 2015, at 7:17 AM, Mikael Ståldal <mi...@magine.com>
>> wrote:
>>
>> I want to create / initializte the delegates of an AsyncAppender
>> asynchronously, to protect the application from exceptions and delays in
>> delegate appender initialization. Is that possible with routing appender?
>>
>> (See https://issues.apache.org/jira/browse/LOG4J2-1043 )
>>
>> On Tue, Jun 16, 2015 at 3:25 PM, Remko Popma <re...@gmail.com>
>> wrote:
>>
>>> You could have a routing appender as the delegate of an async appender.
>>>
>>> On Tue, Jun 16, 2015 at 10:01 PM, Mikael Ståldal <
>>> mikael.staldal@magine.com> wrote:
>>>
>>>> Is is possible to have the delegate(s) of AsyncAppender created
>>>> dynamically, just like the delegates of RoutingAppender?
>>>>
>>>> --
>>>> [image: MagineTV]
>>>>
>>>>  *Mikael Ståldal*
>>>> Senior backend developer
>>>>
>>>>  *Magine TV*
>>>>  mikael.staldal@magine.com
>>>>  Regeringsgatan 25  | 111 53 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.
>>>>
>>>
>>>
>>
>>
>> --
>> [image: MagineTV]
>>
>>  *Mikael Ståldal*
>> Senior backend developer
>>
>>  *Magine TV*
>>  mikael.staldal@magine.com
>>  Regeringsgatan 25  | 111 53 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.
>>
>>
>>
>
>
> --
> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> Java Persistence with Hibernate, Second Edition
> <http://www.manning.com/bauer3/>
> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
> Spring Batch in Action <http://www.manning.com/templier/>
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory
>



-- 
[image: MagineTV]

 *Mikael Ståldal*
Senior backend developer

 *Magine TV*
 mikael.staldal@magine.com
 Regeringsgatan 25  | 111 53 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: AsyncAppender and dynamically created appender

Posted by Gary Gregory <ga...@gmail.com>.
Mikael,

Is this related to an appender hanging or throwing an (unchecked) exception
on start up?

Gary

On Tue, Jun 16, 2015 at 10:27 AM, Ralph Goers <ra...@dslextreme.com>
wrote:

> The Appenders used by the AsyncAppender are known at configuration time.
> So starting and stopping them in conjunction when the configuration is
> initialized makes sense (and makes managing them easier).  The Appenders
> created by the RoutingAppender are dynamic - the number of them and their
> configuration is not completely known at configuration time.  They are
> created based upon the events that are being processed. This makes managing
> them a bit harder.
>
> Note that when FileConfigurationMonitor detects a configuration change it
> starts a new Thread to perform the reconfiguration, so I am not sure what
> you are hoping to gain by configuring Appenders asynchronously.
>
> Ralph
>
>
> On Jun 16, 2015, at 7:17 AM, Mikael Ståldal <mi...@magine.com>
> wrote:
>
> I want to create / initializte the delegates of an AsyncAppender
> asynchronously, to protect the application from exceptions and delays in
> delegate appender initialization. Is that possible with routing appender?
>
> (See https://issues.apache.org/jira/browse/LOG4J2-1043 )
>
> On Tue, Jun 16, 2015 at 3:25 PM, Remko Popma <re...@gmail.com>
> wrote:
>
>> You could have a routing appender as the delegate of an async appender.
>>
>> On Tue, Jun 16, 2015 at 10:01 PM, Mikael Ståldal <
>> mikael.staldal@magine.com> wrote:
>>
>>> Is is possible to have the delegate(s) of AsyncAppender created
>>> dynamically, just like the delegates of RoutingAppender?
>>>
>>> --
>>> [image: MagineTV]
>>>
>>>  *Mikael Ståldal*
>>> Senior backend developer
>>>
>>>  *Magine TV*
>>>  mikael.staldal@magine.com
>>>  Regeringsgatan 25  | 111 53 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.
>>>
>>
>>
>
>
> --
> [image: MagineTV]
>
>  *Mikael Ståldal*
> Senior backend developer
>
>  *Magine TV*
>  mikael.staldal@magine.com
>  Regeringsgatan 25  | 111 53 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.
>
>
>


-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition
<http://www.manning.com/bauer3/>
JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
Spring Batch in Action <http://www.manning.com/templier/>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Re: AsyncAppender and dynamically created appender

Posted by Ralph Goers <ra...@dslextreme.com>.
The Appenders used by the AsyncAppender are known at configuration time. So starting and stopping them in conjunction when the configuration is initialized makes sense (and makes managing them easier).  The Appenders created by the RoutingAppender are dynamic - the number of them and their configuration is not completely known at configuration time.  They are created based upon the events that are being processed. This makes managing them a bit harder.

Note that when FileConfigurationMonitor detects a configuration change it starts a new Thread to perform the reconfiguration, so I am not sure what you are hoping to gain by configuring Appenders asynchronously. 

Ralph


> On Jun 16, 2015, at 7:17 AM, Mikael Ståldal <mi...@magine.com> wrote:
> 
> I want to create / initializte the delegates of an AsyncAppender asynchronously, to protect the application from exceptions and delays in delegate appender initialization. Is that possible with routing appender?
> 
> (See https://issues.apache.org/jira/browse/LOG4J2-1043 <https://issues.apache.org/jira/browse/LOG4J2-1043> )
> 
> On Tue, Jun 16, 2015 at 3:25 PM, Remko Popma <remko.popma@gmail.com <ma...@gmail.com>> wrote:
> You could have a routing appender as the delegate of an async appender.
> 
> On Tue, Jun 16, 2015 at 10:01 PM, Mikael Ståldal <mikael.staldal@magine.com <ma...@magine.com>> wrote:
> Is is possible to have the delegate(s) of AsyncAppender created dynamically, just like the delegates of RoutingAppender?
> 
> -- 
>  
> 
> Mikael Ståldal
> Senior backend developer 
> 
> Magine TV
> mikael.staldal@magine.com <ma...@magine.com>    
> Regeringsgatan 25  | 111 53 Stockholm, Sweden  |   www.magine.com  <http://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.   
> 
> 
> 
> 
> -- 
>  
> 
> Mikael Ståldal
> Senior backend developer 
> 
> Magine TV
> mikael.staldal@magine.com <ma...@magine.com>    
> Regeringsgatan 25  | 111 53 Stockholm, Sweden  |   www.magine.com  <http://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: AsyncAppender and dynamically created appender

Posted by Mikael Ståldal <mi...@magine.com>.
I want to create / initializte the delegates of an AsyncAppender
asynchronously, to protect the application from exceptions and delays in
delegate appender initialization. Is that possible with routing appender?

(See https://issues.apache.org/jira/browse/LOG4J2-1043 )

On Tue, Jun 16, 2015 at 3:25 PM, Remko Popma <re...@gmail.com> wrote:

> You could have a routing appender as the delegate of an async appender.
>
> On Tue, Jun 16, 2015 at 10:01 PM, Mikael Ståldal <
> mikael.staldal@magine.com> wrote:
>
>> Is is possible to have the delegate(s) of AsyncAppender created
>> dynamically, just like the delegates of RoutingAppender?
>>
>> --
>> [image: MagineTV]
>>
>>  *Mikael Ståldal*
>> Senior backend developer
>>
>>  *Magine TV*
>>  mikael.staldal@magine.com
>>  Regeringsgatan 25  | 111 53 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.
>>
>
>


-- 
[image: MagineTV]

 *Mikael Ståldal*
Senior backend developer

 *Magine TV*
 mikael.staldal@magine.com
 Regeringsgatan 25  | 111 53 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: AsyncAppender and dynamically created appender

Posted by Remko Popma <re...@gmail.com>.
You could have a routing appender as the delegate of an async appender.

On Tue, Jun 16, 2015 at 10:01 PM, Mikael Ståldal <mi...@magine.com>
wrote:

> Is is possible to have the delegate(s) of AsyncAppender created
> dynamically, just like the delegates of RoutingAppender?
>
> --
> [image: MagineTV]
>
>  *Mikael Ståldal*
> Senior backend developer
>
>  *Magine TV*
>  mikael.staldal@magine.com
>  Regeringsgatan 25  | 111 53 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.
>