tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cos...@apache.org
Subject cvs commit: jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/log CommonLogHandler.java
Date Tue, 04 Mar 2003 18:21:47 GMT
costin      2003/03/04 10:21:47

  Modified:    util/java/org/apache/tomcat/util/log CommonLogHandler.java
  Log:
  This may look like a stupid commit  - but this is the only piece of jtc that
  didn't compile with gcj compiler.
  
  Revision  Changes    Path
  1.2       +13 -26    jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/log/CommonLogHandler.java
  
  Index: CommonLogHandler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/log/CommonLogHandler.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- CommonLogHandler.java	10 Apr 2002 22:57:22 -0000	1.1
  +++ CommonLogHandler.java	4 Mar 2003 18:21:47 -0000	1.2
  @@ -92,6 +92,7 @@
   		    int verbosityLevel)
       {
           if( prefix==null ) prefix="tomcat";
  +
           org.apache.commons.logging.Log l=(org.apache.commons.logging.Log)loggers.get( prefix
);
           if( l==null ) {
               l=LogFactory.getLog( prefix );
  @@ -101,41 +102,27 @@
   	if( verbosityLevel > this.level ) return;
   
           if( t==null ) {
  -            switch( verbosityLevel ) {
  -            case Log.FATAL:
  -                l.fatal( msg );
  -                break;
  -            case Log.ERROR:
  +            if( verbosityLevel == Log.FATAL )
  +                l.fatal(msg);
  +            else if( verbosityLevel == Log.ERROR )
                   l.error( msg );
  -                break;
  -            case Log.WARNING:
  +            else if( verbosityLevel == Log.WARNING )
                   l.warn( msg );
  -                break;
  -            case Log.INFORMATION:
  +            else if( verbosityLevel == Log.INFORMATION)
                   l.info( msg );
  -                break;
  -            case Log.DEBUG:
  +            else if( verbosityLevel == Log.DEBUG )
                   l.debug( msg );
  -                break;
  -            }
           } else {
  -            switch( verbosityLevel ) {
  -            case Log.FATAL:
  -                l.fatal( msg, t );
  -                break;
  -            case Log.ERROR:
  +            if( verbosityLevel == Log.FATAL )
  +                l.fatal(msg, t);
  +            else if( verbosityLevel == Log.ERROR )
                   l.error( msg, t );
  -                break;
  -            case Log.WARNING:
  +            else if( verbosityLevel == Log.WARNING )
                   l.warn( msg, t );
  -                break;
  -            case Log.INFORMATION:
  +            else if( verbosityLevel == Log.INFORMATION)
                   l.info( msg, t );
  -                break;
  -            case Log.DEBUG:
  +            else if( verbosityLevel == Log.DEBUG )
                   l.debug( msg, t );
  -                break;
  -            }
           }
       }
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message