I’m switching from log4j2 to java logging. In my main class I set it up, read the configuration properties, and everything works fine. In my other classes I just do Logger.getLogger( xxx.class.getName() ). No logging is output from any other class. My configuration is:
.level = INFO
java.util.logging.FileHandler.pattern = %h/PlumeToolV7.1/logs/pt7Log_%g.log
java.util.logging.FileHandler.append = TRUE
java.util.logging.FileHandler.limit = 10485760
java.util.logging.FileHandler.count = 10
java.util.logging.FileHandler.formatter = java.util.logging.SimpleFormatter
java.util.logging.SimpleFormatter.format=%1$tb %1$td, %1$tY %1$tl:%1$tM:%1$tS %1$Tp %2$s%n%4$s: %5$s%n
Any help would be greatly appreciated.
In my main class I initialize the logger by reading the logging properties file using LogManager.getLogManager().readConfiguration( fileInputStream );
In all of the other classes I use (substituting the actual class name):
Logger myLogger = Logger.getLogger( ArchiveScenario.class.getName());
I’m guessing there is something wrong in the setup.