import java.util.logging.Level;
import java.util.logging.Logger;
-
/**
* Hardcoded java.util.logging commons-logging implementation.
*
/** Alternate config reader and console format
*/
- private static final String SIMPLE_FMT="org.apache.tomcat.util.log.JdkLoggerFormatter";
- private static final String SIMPLE_CFG="org.apache.tomcat.util.log.JdkLoggerConfig";
+ private static final String SIMPLE_FMT="java.util.logging.SimpleFormatter";
+ private static final String SIMPLE_CFG="org.apache.juli.JdkLoggerConfig"; //doesn't exist
+ private static final String FORMATTER="org.apache.juli.formatter";
static {
if( System.getProperty("java.util.logging.config.class") ==null &&
} catch( Throwable t ) {
}
try {
- Formatter fmt=(Formatter)Class.forName(SIMPLE_FMT).newInstance();
+ Formatter fmt=(Formatter)Class.forName(System.getProperty(FORMATTER, SIMPLE_FMT)).newInstance();
// it is also possible that the user modified jre/lib/logging.properties -
// but that's really stupid in most cases
Logger root=Logger.getLogger("");
<properties>
+ <property name="org.apache.juli.formatter">
+ <p>If no logging configuration file is specified and no logging configuration class is specified
+ using the <code>java.util.logging.config.class</code> and <code>java.util.logging.config.file</code>
+ properties the default logging framework <code>org.apache.juli</code> will use the default
+ <code>java.util.logging.SimpleFormatter</code> for all console output.
+ To simply override the console output formatter, one can use the described property. Example:
+ <code>-Dorg.apache.juli.formatter=org.apache.juli.OneLineFormatter</code></p>
+ </property>
<property name="org.apache.juli.AsyncOverflowDropType">
<p>When the memory limit of records has been reached the system needs to determine what action to take.
Currently there are three actions that can be taken: