Michael,

I am using both those methods already, but the JavaDoc for
getAllAppenders() states "Get the appenders contained in this category "
and it is correct. I currently have to go through every Category using
getAllAppenders() to build a list list of all the appenders contained in
all the categories, but I am still left with all the Appenders which are
being __used__ is some Category, but not all those __defined__ in my XML
configuration.

Any help would be appreciated.

Regards,

Barry

-----Original Message-----
From: Michael Roytman [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 26, 2001 18:30
To: LOG4J Users Mailing List
Subject: RE: Listing Appenders


Barry,

have you looked at getCurrentCategories() and getAllAppenders()
methods in Category class?

> -----Original Message-----
> From: Sheward, Barry [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, July 26, 2001 5:25 PM
> To: LOG4J Users Mailing List
> Subject: Listing Appenders
> 
> 
> Hi,
> 
> I'm developing some code to allow on-the-fly customization of 
> the Log4j
> configuration in an application, not simply the Priorities assigned to
> Categories, but also addition and deletion of Appenders too.
> 
> I wanted to provide a list of all the Appenders and allow users to
> select the one they want to use.
> 
> The only way I can see from a user perspective (i.e. without modifying
> the Log4J source) to produce a list of Appenders is to scan 
> through all
> the Categories and build a list of all the Appenders based on 
> which ones
> are assigned, but if I have an Appender defined in my XML 
> configuration
> (I use DOMConfigurator) then using this approach I don't see any
> Appenders which aren't assigned to any Category.
> 
> Is there a better way to get a list of available Appenders?
> 
> Thanks and Regards,
> 
> Barry

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

Reply via email to