3.5. Simple Log

When a version of Java lower than 1.4 is being used, and Log4J libraries are not located in the CLASSPATH, then the commons logging package will fall back to using its built-in simple logging system, using the class org.apache.commons.logging.impl.SimpleLog. This system is controlled by the properties in the simplelog.properties resource, or else by various system properties, as specified at the SimpleLog Javadoc.

java -Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog mypkg.MyClass

Example 3.5. Example Simple Log Properties

# by default, we will log messages at "warn" or higher
org.apache.commons.logging.simplelog.defaultlog=warn

# formatting options
org.apache.commons.logging.simplelog.showShortLogname=true
org.apache.commons.logging.simplelog.showdatetime=true

# set the default logging level for all Kodo logs to "info"
org.apache.commons.logging.simplelog.log.kodo.Tool=info
org.apache.commons.logging.simplelog.log.kodo.Runtime=info
org.apache.commons.logging.simplelog.log.kodo.DataCache=info
org.apache.commons.logging.simplelog.log.kodo.MetaData=info
org.apache.commons.logging.simplelog.log.kodo.Enhance=info
org.apache.commons.logging.simplelog.log.kodo.Query=info
org.apache.commons.logging.simplelog.log.kodo.jdbc.SQL=info
org.apache.commons.logging.simplelog.log.kodo.jdbc.JDBC=info
org.apache.commons.logging.simplelog.log.kodo.jdbc.Schema=info