nacho 2002/06/10 14:53:07 Modified: jk/native2/common jk_logger_file.c Log: * Changed %p format specifiers to %#lx - Thanks to JFC * Added level string to log lines. Revision Changes Path 1.28 +19 -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.27 retrieving revision 1.28 diff -u -r1.27 -r1.28 --- jk_logger_file.c 9 Jun 2002 03:00:42 -0000 1.27 +++ jk_logger_file.c 10 Jun 2002 21:53:07 -0000 1.28 @@ -2,7 +2,7 @@ * * * The Apache Software License, Version 1.1 * * * - * Copyright (c) 1999-2001 The Apache Software Foundation. * + * Copyright (c) 1999-2002 The Apache Software Foundation. * * All rights reserved. * * * * ========================================================================= * @@ -59,7 +59,7 @@ * Description: Utility functions (mainly configuration) * * Author: Gal Shachor <[EMAIL PROTECTED]> * * Author: Henri Gomez <[EMAIL PROTECTED]> * - * Version: $Revision: 1.27 $ * + * Version: $Revision: 1.28 $ * ***************************************************************************/ @@ -149,7 +149,6 @@ return JK_LOG_DEBUG_LEVEL; } - static int JK_METHOD jk2_logger_file_init(jk_env_t *env,jk_logger_t *_this ) { FILE *oldF=(FILE *)_this->logger_private; @@ -240,7 +239,23 @@ if(l->logger_private==NULL || l->level <= level) { char *f = (char *)(file + strlen(file) - 1); + char *slevel; + switch (level){ + case JK_LOG_INFO_LEVEL : + slevel=JK_LOG_INFO_VERB; + break; + case JK_LOG_ERROR_LEVEL : + slevel=JK_LOG_ERROR_VERB; + break; + case JK_LOG_EMERG_LEVEL : + slevel=JK_LOG_EMERG_VERB; + break; + case JK_LOG_DEBUG_LEVEL : + default: + slevel=JK_LOG_DEBUG_VERB; + break; + } while(f != file && '\\' != *f && '/' != *f) { f--; } @@ -250,7 +265,7 @@ /* XXX or apr_ctime ? */ apr_rfc822_date( rfctime, time ); - fmt1=apr_psprintf( aprPool, "[%s] [%s:%d] %s", rfctime, f, line, fmt ); + fmt1=apr_psprintf( aprPool, "[%s] (%5s) [%s:%d] %s", rfctime, slevel, f, line, fmt ); buf=apr_pvsprintf( aprPool, fmt1, args ); l->log(env, l, level, buf);
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>