I am trying to use commons logging and want to use java.util.logging as underlying mechanism.
LogTest.java
import org.apache.commons.logging.*;
public class LogTest {
public static void main(String args[]) {
System.setProperty("java.util.logging.config.file","log.properties");
Log logger = LogFactory.getLog(LogTest.class);
logger.trace("trace msg");
}
}
I have src/main/resources/log.properties ( I am using maven project )
handlers=java.util.logging.ConsoleHandler
# Default global logging level.
# Loggers and Handlers may override this level
.level=ALL
I am not able to see any output. Please tell me how to programatically set the log.properties to leverage java logging.