tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Filip Hanik - Dev Lists <devli...@hanik.com>
Subject Re: JdkLoggerConfig missing?
Date Fri, 05 Oct 2007 19:07:11 GMT
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


Mime
View raw message