tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seg...@apache.org
Subject cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/logger FileLogger.java
Date Wed, 20 Feb 2002 15:58:04 GMT
seguin      02/02/20 07:58:04

  Modified:    catalina/src/share/org/apache/catalina/logger
                        FileLogger.java
  Log:
  keep timestamps and log messages from different threads from
  getting mixed up in the log file.
  
  went with the string concatentation approach instead of
  synchronizing the writer because my guess is it's faster.
  of course, i have no evidence to back this up, just going
  on instinct :)
  
  Revision  Changes    Path
  1.6       +7 -7      jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/logger/FileLogger.java
  
  Index: FileLogger.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/logger/FileLogger.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- FileLogger.java	9 Nov 2001 19:39:56 -0000	1.5
  +++ FileLogger.java	20 Feb 2002 15:58:03 -0000	1.6
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/logger/FileLogger.java,v
1.5 2001/11/09 19:39:56 remm Exp $
  - * $Revision: 1.5 $
  - * $Date: 2001/11/09 19:39:56 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/logger/FileLogger.java,v
1.6 2002/02/20 15:58:03 seguin Exp $
  + * $Revision: 1.6 $
  + * $Date: 2002/02/20 15:58:03 $
    *
    * ====================================================================
    *
  @@ -84,7 +84,7 @@
    * optional preceding timestamp.
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.5 $ $Date: 2001/11/09 19:39:56 $
  + * @version $Revision: 1.6 $ $Date: 2002/02/20 15:58:03 $
    */
   
   public final class FileLogger
  @@ -290,10 +290,10 @@
           // Log this message, timestamped if necessary
           if (writer != null) {
               if (timestamp) {
  -                writer.print(tsString);
  -                writer.print(" ");
  +                writer.println(tsString + " " + msg);
  +            } else {
  +                writer.println(msg);
               }
  -            writer.println(msg);
           }
   
       }
  
  
  

--
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