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:55:44 GMT
seguin      02/02/20 07:55:44

  Modified:    catalina/src/share/org/apache/catalina/logger Tag:
                        tomcat_40_branch 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
  No                   revision
  
  
  No                   revision
  
  
  1.3.2.2   +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.3.2.1
  retrieving revision 1.3.2.2
  diff -u -r1.3.2.1 -r1.3.2.2
  --- FileLogger.java	25 Oct 2001 20:07:44 -0000	1.3.2.1
  +++ FileLogger.java	20 Feb 2002 15:55:44 -0000	1.3.2.2
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/logger/FileLogger.java,v
1.3.2.1 2001/10/25 20:07:44 remm Exp $
  - * $Revision: 1.3.2.1 $
  - * $Date: 2001/10/25 20:07:44 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/logger/FileLogger.java,v
1.3.2.2 2002/02/20 15:55:44 seguin Exp $
  + * $Revision: 1.3.2.2 $
  + * $Date: 2002/02/20 15:55:44 $
    *
    * ====================================================================
    *
  @@ -84,7 +84,7 @@
    * optional preceding timestamp.
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.3.2.1 $ $Date: 2001/10/25 20:07:44 $
  + * @version $Revision: 1.3.2.2 $ $Date: 2002/02/20 15:55:44 $
    */
   
   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