I use log4j as logger for my web application. in log4j, I can set the level log in log4j properties or log4j.xml. in log4j, we instance logger as follows:
static Logger logger = Logger.getLogger(SomeClass.class);
I init log4j basic configurator in a servlet file using init method
.
But, I usually test application using JUnit
, So I init the basic configurator in setup method
. after that, I test the application, and I can see the log.
Because I deployed, the web in websphere
. I change all of logging instance become:
private Log log = LogFactory.getLog(Foo.class);
I don't know how to load basic configurator using ACL. so I can't control debug level to my JUnit test.
do you have any suggestion, without changing
static Logger logger = Logger.getLogger(SomeClass.class);
become
static Logger logger = Logger.getLogger(SomeClass.class);