you can always put all appenders in something like Set (see java.util.Set and its implementation classes), then iterate on your set and get all the elements uniquely.
----- Original Message ----- From: "Preetham Kajekar" <[EMAIL PROTECTED]> To: "'Log4J Users List'" <[EMAIL PROTECTED]> Sent: Friday, May 30, 2003 2:23 PM Subject: RE: Getting all the appenders in all the loggers > > > > -----Original Message----- > > From: Vinodh Lakshminarayan [mailto:[EMAIL PROTECTED] > > Sent: Friday, May 30, 2003 5:27 PM > > To: Log4J Users List > > Subject: Re: Getting all the appenders in all the loggers > > > > > > > > Try the following code > > > > Logger logger = .......... file://Your logger > > I need to do it for all the loggers in the system. I know there is > getAllLoggers() in LogManager. I was wondering if there is any other way > of doing this coz with this approach, I may land up getting the same > appender twice (if is associated with 2 loggers) and consequently > rolling over twice. This can be avoided using a Hashtable etc, but more > importantly, the code will be more computation than necessary. > > ~thanks. > ~preetham > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]