Dear Norman,
1) create the categories:
category cat1=getInstance("aaa.bbb.xxx");
category cat2=getInstance("aaa.bbb.zzz");
2) assign the appenders to the categories:
cat1.addAppender(new FileAppender(new Layout(),"C:\file1");
cat2.addAppender(new FileAppender(new Layout(),"C:\file2");
You may also do the stuff via config file (PropertyConfigurator).
Thilo
-----Original Message-----
From: Welp, Norman [mailto:[EMAIL PROTECTED]]
Sent: Mittwoch, 20. Juni 2001 13:13
To: '[EMAIL PROTECTED]'
Subject: Logging configuration
Hello.
I'm kind of new to log4j, so my question could be newbie-like, sorry.
I want to be able to define explicitly that logging should be done only if
it occurs in a certain package.
For example:
A package "aaa.bbb" is devided into packages "aaa.bbb.xxx" and
"aaa.bbb.zzz".
Now i'd like to put the logging for "aaa.bbb.xxx" into a file and for
"aaa.bbb.zzz" into another one.
Anyone ?
Thanks for your time,
Norman.
---------------------------------------------------------------------
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]