tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lu...@apache.org
Subject cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/xmlparser ParserUtils.java
Date Wed, 22 Jan 2003 21:13:53 GMT
luehe       2003/01/22 13:13:52

  Modified:    jasper2/src/share/org/apache/jasper Constants.java JspC.java
               jasper2/src/share/org/apache/jasper/compiler JspReader.java
               jasper2/src/share/org/apache/jasper/runtime
                        JspFactoryImpl.java ProtectedFunctionMapper.java
               jasper2/src/share/org/apache/jasper/xmlparser
                        ParserUtils.java
  Removed:     jasper2/src/share/org/apache/jasper/logging
                        DefaultLogger.java JasperLogger.java LogAware.java
                        Logger.java
  Log:
  Last and final pass at removing org.apache.jasper.logging
  
  Revision  Changes    Path
  1.12      +0 -4      jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/Constants.java
  
  Index: Constants.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/Constants.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- Constants.java	22 Jan 2003 20:08:23 -0000	1.11
  +++ Constants.java	22 Jan 2003 21:13:50 -0000	1.12
  @@ -60,8 +60,6 @@
   import java.util.MissingResourceException;
   import java.text.MessageFormat;
   
  -import org.apache.jasper.logging.Logger;
  -
   /**
    * Some constants and other global data that are used by the compiler and the runtime.
    *
  @@ -226,7 +224,5 @@
        */
       public static final String TEMP_VARIABLE_NAME_PREFIX =
           "_jspx_temp";
  -
  -    public static Logger jasperLog = null;
   }
   
  
  
  
  1.28      +4 -36     jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/JspC.java
  
  Index: JspC.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/JspC.java,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- JspC.java	22 Jan 2003 20:08:23 -0000	1.27
  +++ JspC.java	22 Jan 2003 21:13:51 -0000	1.28
  @@ -75,8 +75,6 @@
   import org.apache.jasper.compiler.JspConfig;
   import org.apache.jasper.compiler.TagPluginManager;
   import org.apache.jasper.compiler.Localizer;
  -import org.apache.jasper.logging.Logger;
  -import org.apache.jasper.logging.JasperLogger;
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
   
  @@ -159,8 +157,6 @@
       boolean largeFile = false;
       boolean mappedFile = false;
   
  -    int jspVerbosityLevel = Logger.INFORMATION;
  -
       File scratchDir;
   
       String ieClassId = DEFAULT_IE_CLASS_ID;
  @@ -279,10 +275,6 @@
           return ieClassId;
       }
   
  -    public int getJspVerbosityLevel() {
  -        return jspVerbosityLevel;
  -    }
  -
       public File getScratchDir() {
           return scratchDir;
       }
  @@ -327,10 +319,6 @@
           return System.getProperty("java.class.path");
       }
   
  -    public JspC() {
  -        Constants.jasperLog = new JasperLogger();
  -    }
  -
       // -------------------- Options --------------------
       public void setClassPath(String s) {
           classPath=s;
  @@ -351,10 +339,6 @@
           }
       }
   
  -    public void setVerbose( int level ) {
  -        Constants.jasperLog.setVerbosityLevel(level);
  -    }
  -
       public void setCompile( boolean b ) {
           compile=b;
       }
  @@ -877,25 +861,11 @@
           args = arg;
           String tok;
   
  -        int verbosityLevel = Logger.WARNING;
           dieLevel = NO_DIE_LEVEL;
           die = dieLevel;
   
           while ((tok = nextArg()) != null) {
  -            if (tok.equals(SWITCH_QUIET)) {
  -                verbosityLevel = Logger.WARNING;
  -            } else if (tok.equals(SWITCH_VERBOSE)) {
  -                verbosityLevel = Logger.INFORMATION;
  -            } else if (tok.startsWith(SWITCH_VERBOSE)) {
  -                try {
  -                    verbosityLevel
  -                     = Integer.parseInt(tok.substring(SWITCH_VERBOSE.length()));
  -                } catch (NumberFormatException nfe) {
  -                    logStream.println("Verbosity level "
  -				      + tok.substring(SWITCH_VERBOSE.length())
  -				      + " is not valid.  Option ignored.");
  -                }
  -            } else if (tok.equals(SWITCH_OUTPUT_DIR)) {
  +            if (tok.equals(SWITCH_OUTPUT_DIR)) {
                   tok = nextArg();
                   setOutputDir( tok );
               } else if (tok.equals(SWITCH_OUTPUT_SIMPLE_DIR)) {
  @@ -962,8 +932,6 @@
               if( file==null ) break;
               pages.addElement( file );
           }
  -
  -        Constants.jasperLog.setVerbosityLevel(verbosityLevel);
       }
   
       /**
  
  
  
  1.14      +9 -5      jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/JspReader.java
  
  Index: JspReader.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/JspReader.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- JspReader.java	13 Dec 2002 21:13:25 -0000	1.13
  +++ JspReader.java	22 Jan 2003 21:13:51 -0000	1.14
  @@ -58,10 +58,14 @@
   import java.io.*;
   import java.util.*;
   import java.util.jar.JarFile;
  +
  +import org.apache.commons.logging.Log;
  +import org.apache.commons.logging.LogFactory;
  +
   import org.apache.jasper.Constants;
   import org.apache.jasper.JasperException;
   import org.apache.jasper.JspCompilationContext;
  -import org.apache.jasper.logging.*;
  +
   import org.xml.sax.Attributes;
   import org.xml.sax.helpers.AttributesImpl;
   
  @@ -83,6 +87,9 @@
   
   class JspReader {
   
  +    // Logger
  +    private static Log log = LogFactory.getLog(JspReader.class);
  +
       private Mark current;
       private String master;
       private Vector sourceFiles;
  @@ -90,7 +97,6 @@
       private int size;
       private JspCompilationContext context;
       private ErrorDispatcher err;
  -    private Logger.Helper loghelper;
   
       /*
        * Set to true when using the JspReader on a single file where we read up
  @@ -130,8 +136,6 @@
   	currFileId = 0;
   	size = 0;
   	singleFile = false;
  -
  -	loghelper = new Logger.Helper("JASPER_LOG", "JspReader");
   	pushFile(fname, encoding, reader);
       }
       
  @@ -565,7 +569,7 @@
   				   longName, encoding);
   	    }
   	} catch (Throwable ex) {
  -	    loghelper.log("Exception parsing file ", ex);
  +	    log.error("Exception parsing file ", ex);
   	    // Pop state being constructed:
   	    popFile();
   	    err.jspError("jsp.error.file.cannot.read", "ze file");
  
  
  
  1.3       +12 -11    jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/runtime/JspFactoryImpl.java
  
  Index: JspFactoryImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/runtime/JspFactoryImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- JspFactoryImpl.java	21 Oct 2002 19:10:54 -0000	1.2
  +++ JspFactoryImpl.java	22 Jan 2003 21:13:51 -0000	1.3
  @@ -60,19 +60,19 @@
    */ 
   package org.apache.jasper.runtime;
   
  +import java.security.AccessController;
  +import java.security.PrivilegedAction;
  +
   import javax.servlet.Servlet;
   import javax.servlet.ServletRequest;
   import javax.servlet.ServletResponse;
  -
   import javax.servlet.jsp.JspFactory;
   import javax.servlet.jsp.JspEngineInfo;
   import javax.servlet.jsp.PageContext;
   
  -import java.security.AccessController;
  -import java.security.PrivilegedAction;
  -
   import org.apache.jasper.util.SimplePool;
  -import org.apache.jasper.logging.Logger;
  +import org.apache.commons.logging.Log;
  +import org.apache.commons.logging.LogFactory;
   
   /**
    * Implementation of JspFactory.
  @@ -81,12 +81,13 @@
    */
   public class JspFactoryImpl extends JspFactory {
   
  +    // Logger
  +    private static Log log = LogFactory.getLog(JspFactoryImpl.class);
  +
       private static final String SPEC_VERSION = "2.0";
       private static final boolean USE_POOL = true;
   
       private SimplePool pool = new SimplePool( 100 );
  -    private Logger.Helper loghelper = new Logger.Helper("JASPER_LOG",
  -							"JspFactoryImpl");
       
       public PageContext getPageContext(Servlet servlet,
   				      ServletRequest request,
  @@ -150,7 +151,7 @@
               return pc;
           } catch (Throwable ex) {
               /* FIXME: need to do something reasonable here!! */
  -            loghelper.log("Exception initializing page context", ex);
  +            log.fatal("Exception initializing page context", ex);
               return null;
           }
       }
  
  
  
  1.3       +5 -9      jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/runtime/ProtectedFunctionMapper.java
  
  Index: ProtectedFunctionMapper.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/runtime/ProtectedFunctionMapper.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ProtectedFunctionMapper.java	7 Nov 2002 21:11:40 -0000	1.2
  +++ ProtectedFunctionMapper.java	22 Jan 2003 21:13:51 -0000	1.3
  @@ -58,15 +58,15 @@
    * <http://www.apache.org/>.
    *
    */
  -package org.apache.jasper.runtime;
   
  -import org.apache.jasper.logging.Logger;
  +package org.apache.jasper.runtime;
   
   import java.util.HashMap;
   import java.security.AccessController;
   import java.security.PrivilegedAction;
   import java.security.PrivilegedExceptionAction;
   import java.security.PrivilegedActionException;
  +
   /**
    * Maps EL functions to their Java method counterparts.  Keeps the
    * actual Method objects protected so that JSP pages can't indirectly
  @@ -76,10 +76,6 @@
    * @author Kin-man Chung
    */
   public final class ProtectedFunctionMapper {
  -
  -    /** For tracing of error messages */
  -    private static Logger.Helper loghelper = new Logger.Helper("JASPER_LOG", 
  -	"ProtectedFunctionMapper");
   
       /** 
        * Maps "prefix:name" to java.lang.Method objects.  Lazily created.
  
  
  
  1.8       +1 -2      jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/xmlparser/ParserUtils.java
  
  Index: ParserUtils.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/xmlparser/ParserUtils.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ParserUtils.java	22 Jan 2003 20:08:25 -0000	1.7
  +++ ParserUtils.java	22 Jan 2003 21:13:51 -0000	1.8
  @@ -63,7 +63,6 @@
   
   import org.apache.jasper.Constants;
   import org.apache.jasper.JasperException;
  -import org.apache.jasper.logging.Logger;
   import org.apache.jasper.compiler.Localizer;
   
   import org.apache.commons.logging.Log;
  
  
  

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


Mime
View raw message