tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@locus.apache.org
Subject cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/logging Logger.java TomcatLogger.java
Date Sun, 13 Feb 2000 06:47:40 GMT
akv         00/02/12 22:47:40

  Modified:    src/etc  server.xml
               src/share/org/apache/tomcat/logging Logger.java
                        TomcatLogger.java
  Log:
  Added support for enabling/disabling timestamps in the log file.
  
  Revision  Changes    Path
  1.5       +2 -1      jakarta-tomcat/src/etc/server.xml
  
  Index: server.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/etc/server.xml,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- server.xml	2000/02/13 06:35:30	1.4
  +++ server.xml	2000/02/13 06:47:39	1.5
  @@ -25,7 +25,8 @@
   
   	<Logger name="STARTUP_LOG"
   		path="logs/tomcat.log"
  -		verbosityLevel = "DEBUG" />
  +		verbosityLevel = "DEBUG"
  +		timestamp = "no" />
   
   	<Logger name="JASPER_LOG" 
   	        path="logs/jasper.log"
  
  
  
  1.3       +13 -0     jakarta-tomcat/src/share/org/apache/tomcat/logging/Logger.java
  
  Index: Logger.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/logging/Logger.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Logger.java	2000/02/13 06:34:50	1.2
  +++ Logger.java	2000/02/13 06:47:40	1.3
  @@ -274,6 +274,18 @@
       }
   
       /**
  +     * Do we need to time stamp this or not?
  +     *
  +     * @param	value		"yes/no" or "true/false"
  +     */
  +    public void setTimestamp(String value) {
  +	if ("true".equalsIgnoreCase(value) || "yes".equalsIgnoreCase(value))
  +	    timeStamp = true;
  +	else if ("false".equalsIgnoreCase(value) || "no".equalsIgnoreCase(value))
  +	    timeStamp = false;
  +    }
  +
  +    /**
        * Set the default output stream that is used by all logging
        * channels. 
        * 
  @@ -302,4 +314,5 @@
       protected static Hashtable loggers = new Hashtable(5);
   
       private int level = WARNING;
  +    protected boolean timeStamp = true;
   }
  
  
  
  1.2       +2 -1      jakarta-tomcat/src/share/org/apache/tomcat/logging/TomcatLogger.java
  
  Index: TomcatLogger.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/logging/TomcatLogger.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TomcatLogger.java	2000/02/13 06:18:48	1.1
  +++ TomcatLogger.java	2000/02/13 06:47:40	1.2
  @@ -104,7 +104,8 @@
   	    PrintWriter w = new PrintWriter(sw);
   
   	    w.print("<"+TomcatLogger.this.getName()+"> ");
  -	    w.print(new Date(date).toString());
  +	    if (TomcatLogger.this.timeStamp)
  +		w.print(new Date(date).toString());
   	    w.print(' ');
   
   	    if (message != null)
  
  
  

Mime
View raw message