costin      01/02/05 22:42:28

  Modified:    src/share/org/apache/tomcat/modules/config LogSetter.java
  Log:
  Added the missing options for removing and configuring timestamps.
  
  Revision  Changes    Path
  1.6       +21 -1     
jakarta-tomcat/src/share/org/apache/tomcat/modules/config/LogSetter.java
  
  Index: LogSetter.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/config/LogSetter.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- LogSetter.java    2001/02/03 07:34:41     1.5
  +++ LogSetter.java    2001/02/06 06:42:28     1.6
  @@ -140,6 +140,8 @@
       String path;
       String verbosityLevel;
       boolean servletLogger=false;
  +    boolean timestamps=true;
  +    String tsFormat=null;
       
       public LogSetter() {
       }
  @@ -165,6 +167,20 @@
       public void setServletLogger( boolean b ) {
        servletLogger=b;
       }
  +
  +    /** Display the time of the event ( log ).
  +     */
  +    public void setTimestamps( boolean b ) {
  +     timestamps=b;
  +    }
  +
  +    /** Set the format of the timestamp.
  +     "msec" will display the raw time ( fastest ),
  +     otherwise a SimpleDateFormat.
  +    */
  +    public void setTimestampFormat( String s ) {
  +     tsFormat=s;
  +    }
       
       /**
        *  The log will be added and opened as soon as the module is
  @@ -205,7 +221,11 @@
        // construct a queue logger
        QueueLogger ql=new QueueLogger();
        ql.setName(name);
  -
  +     if( ! timestamps )
  +         ql.setTimestamp( "false" );
  +     if( tsFormat!=null )
  +         ql.setTimestampFormat( tsFormat );
  +     
        if( path!=null )
            ql.setPath(path);
        if( verbosityLevel!= null )
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to