| Author |
null value in log4j level
|
andy garcia
Greenhorn
Joined: Oct 28, 2008
Posts: 4
|
|
Hi. I have a problem with log4j with Struts. I have a variable in the log4j.properties that sets the log level, like this: if (GlobalProperties.get("log_level").equals("ALL")){ logger.setLevel(Level.ALL); }else if (GlobalProperties.get("log_level").equals("OFF")){ logger.setLevel(Level.OFF); } When the Action gets running it works fine. The problem is when I call a method in a different class, the logger level retrieves a null value. Neither the logger.getLevel() nor the logger.getEffectiveLogger() nor the getRoot(). What am I doing wrong? Thanks very much in advance!
|
 |
Martijn Verburg
author
Bartender
Joined: Jun 24, 2003
Posts: 3268
|
|
I may have been a bit premature in sending this here, but I suspect this is better served in the Struts forum, I'm sure the resident bartender(s) will throw it back if I'm wrong
|
Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
|
 |
 |
|
|
subject: null value in log4j level
|
|
|