Hi :

The objective is - messages from different modules (categories) need to 
go into separate files exclusively. Actually i tried to set it up in 
such a way  :

log4j.category.com.x.y.a1=DEBUG, R
log4j.category.com.x.y.a2=DEBUG,AA

and set separate appenders for R and AA, which works perfectly fine.

But we are using Tomcat-uPortal which has its own Logger.properties file 
(so in our system we have two of them) and it sets the 
log4j.rootCategory=DEBUG, R and this makes all the messages to flow into 
this file as all other categories come under the Root. Is there any way 
i can work-around this (either by changing the Logger.properties of 
Tomcat-uPortal) or any other change ?

Thanks & Regards.
Ravi

[EMAIL PROTECTED] wrote:

> Hi ravi,
> 
> Try this change in the properties and in the java file also.
> 
> log4j.logger.Log1=DEBUG,Log1
> log4j.logger.Log2=DEBUG,Log2
> 
> log4j.logger=Log1
> log4j.logger=Log2
> 
> log4j.appender.Log1=org.apache.log4j.DailyRollingFileAppender
> log4j.appender.Log1.layout=org.apache.log4j.HTMLLayout
> log4j.appender.Log1.File=F:/send/X1.html
> log4j.appender.Log1.datePattern='.'yyyy-MM
> 
> 
> log4j.appender.Log2=org.apache.log4j.DailyRollingFileAppender
> log4j.appender.Log2.layout=org.apache.log4j.HTMLLayout
> log4j.appender.Log2.File=F:/send/X2.html
> log4j.appender.Log2.datePattern='.'yyyy-MM
> 
> in java file ,
> 
> public static Logger log1  = null;
>  public  static Logger log2  = null
> 
> log1  = Logger.getLogger("Log1");
> 
> log2 = Logger.getLogger("Log2");
> 
> and so u can call  log1.debug or log2.error ...
> 
> hope this will solve the problem.
> 
> kirusshna
> 
> 
> 
> 
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, July 13, 2002 8:45 AM
> To: [EMAIL PROTECTED]
> Subject: Specifying exclusive log file for one category
> 
> I have a root category and other other categories under it instantiated as
> with their class name strings for logging.
> 
> Now for just one of my classes i want the messages to go into a different
> log file (these messages should not appear in the main log where all other
> classes log their messages).
> 
> Is there any way to specify this in the Logger.properties file or some other
> way this can be achieved ?
> 
> Thanks & Regards.
> Ravi
> 
> 
> --
> ***************************************
> ...Tough times don't last, Tough People Do...
> ***************************************
> 
> 
> 
> __________________________________________________________________
> Your favorite stores, helpful shopping tools and great gift ideas.
> Experience the convenience of buying online with Shop@Netscape!
> http://shopnow.netscape.com/
> 
> Get your own FREE, personal Netscape Mail account today at
> http://webmail.netscape.com/
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
> 



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

Reply via email to