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 <mikael.stal...@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.stal...@magine.com > <mailto:mikael.stal...@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 <garydgreg...@gmail.com > <mailto:garydgreg...@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.go...@dslextreme.com > <mailto:ralph.go...@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.stal...@magine.com >> <mailto:mikael.stal...@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.po...@gmail.com >> <mailto:remko.po...@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.stal...@magine.com >> <mailto:mikael.stal...@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.stal...@magine.com <mailto:mikael.stal...@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.stal...@magine.com <mailto:mikael.stal...@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: garydgreg...@gmail.com <mailto:garydgreg...@gmail.com> | > ggreg...@apache.org <mailto:ggreg...@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.stal...@magine.com <mailto:mikael.stal...@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.stal...@magine.com <mailto:mikael.stal...@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. >