Martin,

> Unfortunately there doesn't seem to be a provision for programmatic
> access to _all_ Appenders, e.g. those configured in a
> PropertyConfigurator. In fact PropertyConfigurator _clears_ the list of
> appenders and is proud of it.

What other appenders would there be?  If an appender is not attached to a
logger, then it is not used, is not referenced, so it should get released.

> Is there a PropertyConfigurator variant out there which
> A) creates _all_ the appenders in the properties file (not just those
> which happen to be used),
> B) gives the application programmatic access to the list of _all_
> existing Appenders, whether in use or not.
> C) allows to remove a specified appender
> D) allows to remove all unused appenders

Again, appenders are only referenced in relation to the logger(s) they are
attached to.  There is no other mechanism for storing appender objects (like
an AppenderRegistry).  You can always write your own configurator that does
this for you, but it will be a tough row to hoe.  For one thing, all the
appenders for a given logger are cleared when a logger is configured via the
configuration file.  This will affect any other logger (or your registry)
that also has a reference to the same appender.

What problem are you trying to solve?

-Mark


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to