You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Dain Sundstrom <da...@iq80.com> on 2007/10/05 20:45:12 UTC
JdkLoggerConfig missing?
I've been trying to figure out how Tomcat initializes it's logging
and am now very confused. It appears that the juli is initialized in
this static block in DirectJDKLog.
private static final String
SIMPLE_FMT="org.apache.tomcat.util.log.JdkLoggerFormatter";
private static final String
SIMPLE_CFG="org.apache.tomcat.util.log.JdkLoggerConfig";
static {
if( System.getProperty("java.util.logging.config.class")
==null &&
System.getProperty("java.util.logging.config.file")
==null ) {
// default configuration - it sucks. Let's override at
least the
// formatter for the console
try {
Class.forName(SIMPLE_CFG).newInstance();
} catch( Throwable t ) {
}
The reason, I'm confused is the JdkLoggerConfig doesn't seem to
exist. I searched google and found the source in a sandbox branch,
but I don't think it was ever coppied to trunk.
Anyway, anyone know where logging is initialized now days?
Thanks,
-dain
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: JdkLoggerConfig missing?
Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
Dain Sundstrom wrote:
> I've been trying to figure out how Tomcat initializes it's logging and
> am now very confused. It appears that the juli is initialized in this
> static block in DirectJDKLog.
>
> private static final String
> SIMPLE_FMT="org.apache.tomcat.util.log.JdkLoggerFormatter";
> private static final String
> SIMPLE_CFG="org.apache.tomcat.util.log.JdkLoggerConfig";
>
> static {
> if( System.getProperty("java.util.logging.config.class")
> ==null &&
> System.getProperty("java.util.logging.config.file")
> ==null ) {
> // default configuration - it sucks. Let's override at
> least the
> // formatter for the console
> try {
> Class.forName(SIMPLE_CFG).newInstance();
> } catch( Throwable t ) {
> }
>
>
> The reason, I'm confused is the JdkLoggerConfig doesn't seem to
> exist. I searched google and found the source in a sandbox branch,
> but I don't think it was ever coppied to trunk.
>
> Anyway, anyone know where logging is initialized now days?
it's always specified as -Djava.util.logging.config.class in
catalina.bat/catalina.sh with the releases that Tomcat ship.
initialization is in the LogFactory.getLog(...), this calls
DirectJDKLog(...) and that calls java.util.Logger.getLogger(...), and
this guy, reads the system property
Filip
>
>
> Thanks,
>
> -dain
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org