RE: Log4j over several java classes

2009-11-04 Thread DanyLux
Hi Matt, Well what I wanted to to is to have a class like my LogFile.java file where I define everything I need for the logfile. And as you can see I also have done a method called logError(String message) which I call and make 2 info logging and then an error logging. So I don't need all time to

RE: Log4j over several java classes

2009-11-04 Thread Matt Brown
If each of your classes create a new LogFile instance, and the constructor of the LogFile class creates a new appender and adds it to the root logger, then this means that you've attached N copies of the appender to the root logger. This explains why you are seeing the message duplicated in the