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/common jk_logger_file.c
Date Wed, 12 Dec 2001 21:54:51 GMT
costin      01/12/12 13:54:51

  Modified:    jk/native2/common jk_logger_file.c
  Log:
  Few changes to make it consistent with the apache ap_log.
  
  Revision  Changes    Path
  1.6       +7 -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.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- jk_logger_file.c	2001/12/06 22:59:52	1.5
  +++ jk_logger_file.c	2001/12/12 21:54:51	1.6
  @@ -59,7 +59,7 @@
    * Description: Utility functions (mainly configuration)                   *
    * Author:      Gal Shachor <shachor@il.ibm.com>                           *
    * Author:      Henri Gomez <hgomez@slib.fr>                               *
  - * Version:     $Revision: 1.5 $                                           *
  + * Version:     $Revision: 1.6 $                                           *
    ***************************************************************************/
   
   #include "jk_env.h"
  @@ -221,7 +221,8 @@
   #ifdef WIN32
   	set_time_str(buf, HUGE_BUFFER_SIZE);
   	used = strlen(buf);
  -        used += _snprintf(&buf[used], HUGE_BUFFER_SIZE, " [%s (%d)]: ", f, line); 
      
  +        if( level >= JK_LOG_DEBUG_LEVEL )
  +            used += _snprintf(&buf[used], HUGE_BUFFER_SIZE, " [%s (%d)]: ", f, line);
       
   #elif defined(NETWARE) /* until we get a snprintf function */
           buf = (char *) malloc(HUGE_BUFFER_SIZE);
           if (NULL == buf)
  @@ -229,11 +230,13 @@
   
   	jk_logger_file_setTimeStr(buf, HUGE_BUFFER_SIZE);
   	used = strlen(buf);
  -        used += sprintf(&buf[used], " [%s (%d)]: ", f, line);
  +        if( level >= JK_LOG_DEBUG_LEVEL )
  +            used += sprintf(&buf[used], " [%s (%d)]: ", f, line);
   #else 
   	jk_logger_file_setTimeStr(buf, HUGE_BUFFER_SIZE);
   	used = strlen(buf);
  -        used += snprintf(&buf[used], HUGE_BUFFER_SIZE, " [%s (%d)]: ", f, line);  
     
  +        if( level >= JK_LOG_DEBUG_LEVEL )
  +            used += snprintf(&buf[used], HUGE_BUFFER_SIZE, " [%s (%d)]: ", f, line);
       
   #endif
           if(used < 0) {
               return 0; /* [V] not sure what to return... */
  
  
  

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