Hi all,
I'm doing some pretty simple Log4J stuff - make a rolling file appender, give it a PatternLayout, add it to a logger. What's strange is that the logger is logging everything twice: once according to SimpleLayout, and once according to my PatternLayout. What's strange is that it's doing it *to the same file*. I'm configuring this programmaticaly and am not touching the existing Log4J config files.
This is just too weird. What's going on?
Thanks,
McGee
P.S. My config code is below
m_mainLogger = Logger.getLogger("main");
Layout layout = new PatternLayout("%d{DATE} %m\n");
RollingFileAppender rfa = new RollingFileAppender(layout, file.getAbsolutePath());
rfa.setMaxFileSize("100KB");
m_mainLogger.addAppender(rfa);