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 <[EMAIL PROTECTED]>                           *
    * Author:      Henri Gomez <[EMAIL PROTECTED]>                               *
  - * 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:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to