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!