I have the following class
public class MyClass { private static final Logger logger = Logger.getLogger(MyClass.class); static { logger.info("some text"); } }
Can we assume that by the time logger.info reached, the logger.info system is initialized and ready to emit logs?
It seems that if I can do Logger.getLogger() and return a valid instance of Logger, that means Log4j is initialized, right?
Swaranga sarma
source share