In my log4j.properties I have:
log4j.rootLogger=DEBUG,stdout
log4j.logger.notRootLogger=DEBUG,somewhereelse
The appenders stdout and somewhereelse are both configured properly, stdout writes to the console and somewhereelse writes to a file.
In my code in each class either I set either:
static Logger log = Logger.getLogger("notRootLogger);
^ When I don't want stuff going to the console.
-OR-
static Logger log = Logger.getRootLogger();
^ When I do.
What do I have to do in log4.properties to stop the things that are written to notRootLogger ending up in stdout? Is there some sort of inheritance of wherever the root logger writes to going on that needs to be turned off somehow?
I don't want to have to configure a logger for every single class individually that I just want to log to the console.