Hi All,
I see log4J logging the same information twice.
I call a method ( pasted below ). the method returns me a myLogger which is a instance of the log4j Logger
then I do a
myLogger.fatal(myAct.createStringForFileLogging(stepName));
I do this in a MDB. Also if myLogger is not null, I use myLogger as is
this is how I get the logger
String logPattern = "%m%n";
String datePattern = "'.'yyyy-MM-dd"
Logger myLogger = null;
DailyRollingFileAppender logFile = null;
logFile = new DailyRollingFileAppender(new PatternLayout(logPattern),logFileName, datePattern);
myLogger = Logger.getLogger(loggerName);
myLogger.addAppender(logFile);
myLogger.setLevel(Level.DEBUG);
return myLogger;
Appreciate help on this. Its been driving me crazy