How to log multiple classes using Log4J ?
1 posts in topic
Flat View  Flat View

Posted By:   Sherbir_S
Posted On:   Friday, October 15, 2004 03:51 AM


Hi All,
I am using Log4J to log the output of my application to a

I am specifying a single output file for a simple java
class to be logged.

My problem is, if my java program has multiple classes,
how will I log the output of each class separately to that
file ?

Any suggessions ???

Please Help.

Re: How to log multiple classes using Log4J ?

Posted By:   Santosh_Kottamasu  
Posted On:   Wednesday, October 27, 2004 05:35 PM

Hi Sherbir,

In all your class files you can use this code to log the message:

private final static Logger _err = Logger.getLogger("_ERROR");

_err.info("log some error");

in your properties file add the following entry:


Let me know if this helps or not

About | Sitemap | Contact