java - When can the rootLogger be null? -
i working web application, valid log4j.properties file, appears 1 of libraries used application raising null pointer exception put call. realized logger.getrootlogger() return not null object, getlevel returning null, mystery
import org.apache.log4j.logger; import java.util.map; public static setdefaults { map<string,string> hashmap = new hashmap<string,string>(); hashmap.put("log", logger.getrootlogger().getlevel().tostring()); }
edit: indeed 1.x (1.2), call happens in static initialization block. tried code out in test class, , long class path includes log4j, can't find statement null.
Comments
Post a Comment