Well, I'm new to both, but it think you want Category.addAppender(). It lets
you bind an appender to any position in the hierarchy, not just root as you
get with BasicConfigurator.configure():

        FileAppender fa = ...
        SocketAppender sa = ...
        catx.addAppender(fa);
        caty.addAppender(sa);

What I haven't yet figured out is the best way to perform this
configuration, since I figure Category is best instantiated local to the
class (using FQN hierachy), but overall logging policy is definitely not
local.


> -----Original Message-----
> From: John Preston [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, March 06, 2001 1:17 PM
> To: LOG4J Users Mailing List
> Subject: Re: log4j version 1.1b1 available
> 
> 
> Hi,
> I'm new to the list but have been using log4J from the early 
> days before it was under the apache group.
> 
> Can anyone ell me or point me in the right direction of how 
> to have two or more log streams that log both info, and 
> error, etc messages to different appenders. I want to have 
> two or more categories
> that I can use the catx.info(), catx.error(), etc methods and 
> caty.info(), caty.error(), etc so that catx's output goes to 
> a fileappender say, and caty's output goes to a socketapender().
> 
> Thanks in advance
> 
> John Preston
> 
> 
> ---------------------------------------------------------------------
> 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]

Reply via email to