tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cos...@apache.org
Subject cvs commit: jakarta-tomcat-connectors/jk/native2/server/apache2 jk_logger_apache2.c
Date Tue, 04 Dec 2001 19:11:56 GMT
costin      01/12/04 11:11:56

  Modified:    jk/native2/common jk_logger_file.c
               jk/native2/server/apache2 jk_logger_apache2.c
  Log:
  Few fixes in logger.
  
  Apache logger will use 'warn' level for normal jk messages, 'error' for
  jk errors.
  
  Revision  Changes    Path
  1.4       +3 -4      jakarta-tomcat-connectors/jk/native2/common/jk_logger_file.c
  
  Index: jk_logger_file.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_logger_file.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- jk_logger_file.c	2001/12/02 02:09:44	1.3
  +++ jk_logger_file.c	2001/12/04 19:11:56	1.4
  @@ -59,10 +59,9 @@
    * Description: Utility functions (mainly configuration)                   *
    * Author:      Gal Shachor <shachor@il.ibm.com>                           *
    * Author:      Henri Gomez <hgomez@slib.fr>                               *
  - * Version:     $Revision: 1.3 $                                           *
  + * Version:     $Revision: 1.4 $                                           *
    ***************************************************************************/
   
  -#include "jk_util.h"
   #include "jk_env.h"
   #include "jk_map.h"
   #include "jk_logger.h"
  @@ -158,7 +157,7 @@
   
       _this->level = jk_logger_file_parseLogLevel(levelS);
       if( _this->level == 0 )
  -        _this->jkLog( _this, JK_LOG_ERROR, "Level %s %d \n", levelS, _this->level
); */
  +        _this->jkLog( _this, JK_LOG_ERROR, "Level %s %d \n", levelS, _this->level
); 
       
       if( logformat==NULL ) {
           logformat=JK_TIME_FORMAT;
  @@ -228,7 +227,7 @@
           if (NULL == buf)
              return -1;
   
  -	set_time_str(buf, HUGE_BUFFER_SIZE);
  +	jk_logger_file_setTimeStr(buf, HUGE_BUFFER_SIZE);
   	used = strlen(buf);
           used += sprintf(&buf[used], " [%s (%d)]: ", f, line);
   #else 
  
  
  
  1.2       +10 -2     jakarta-tomcat-connectors/jk/native2/server/apache2/jk_logger_apache2.c
  
  Index: jk_logger_apache2.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/server/apache2/jk_logger_apache2.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- jk_logger_apache2.c	2001/12/02 22:09:54	1.1
  +++ jk_logger_apache2.c	2001/12/04 19:11:56	1.2
  @@ -75,13 +75,13 @@
    * @author Costin Manolache
    */ 
   
  -#include "jk_util.h"
   #include "jk_env.h"
   #include "jk_map.h"
   #include "jk_logger.h"
   #include <stdio.h>
   
   #include "httpd.h"
  +#include "http_log.h"
   
   #define HUGE_BUFFER_SIZE (8*1024)
   
  @@ -147,8 +147,16 @@
       rc = vsnprintf(buf, HUGE_BUFFER_SIZE, fmt, args);
   #endif
       va_end(args);
  +    rc=strlen( buf );
  +    /* Remove trailing \n. XXX need to change the log() to not include \n */
  +    if( buf[rc-1] == '\n' )
  +        buf[rc-1]='\0';
       
  -    ap_log_error( file, line, level, 0, s, buf);
  +    if( level >= JK_LOG_ERROR ) {
  +        ap_log_error( file, line, APLOG_EMERG | APLOG_NOERRNO, 0, s, buf);
  +    } else {
  +        ap_log_error( file, line, APLOG_DEBUG | APLOG_NOERRNO, 0, s, buf);
  +    }
       return rc ;
   }
   
  
  
  

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