logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chan, Christopher" <christopher.c...@eds.com>
Subject Using Log4j in Abstract Classes
Date Mon, 09 Dec 2002 05:31:39 GMT
Hi,

I have searched the archives but could not find an answer to the below
problem I am having.....

In my Abstact class I create a logger wrapper object (similar to the
commons-logger wrapper) as follows:


public abstract class MyAbstractClass {

	private static Log4jLogger logger = new
Log4jLogger(MyAbstractClass.class.getName());
}



I have a class that extends this abstract class as follows:

public class $CLASS_NAME$ extends MyAbstractClass {

	private static Log4jLogger logger = new
Log4jLogger($CLASS_NAME$.class.getName());
}


When make a log call (eg.  logger.info("my message") ) in the class
$CLASS_NAME$, the message works fine.  However, any log calls in abstract
class do not get displayed.


How do I get the log messages to work in the abstract class? Have I left
something out?

Thanks
Chris


--
To unsubscribe, e-mail:   <mailto:log4j-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:log4j-user-help@jakarta.apache.org>


Mime
View raw message