I have a class that is logging things in application log. I wanted to have something special logged to a separate file, so I created an inner class and modified the SpringConfig like this
log4j.logger.xxx.OuterClass.InnerClass=INFO, STALENESS
private static final Log log = LogFactory.getLog(InnerClass.class);
And with appender STALENESS
it should write to the new file.
I think this should work, but it didn't. It's still writing in the original file, except that it has an "appender" like: 04 Oct 2016 20:55:40,746 [INFO] (main) xxx.OuterClass$InnerClass: test message
It works when the class is extracted out.
Does anyone have an idea why it's not working? Should it work for inner class or I have to extract the class out?