mturk       2004/11/11 03:57:56

  Modified:    jk/native/common jk_logger.h
  Log:
  Use proper gcc macro and fix #if defined
  
  Revision  Changes    Path
  1.15      +8 -3      jakarta-tomcat-connectors/jk/native/common/jk_logger.h
  
  Index: jk_logger.h
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_logger.h,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- jk_logger.h       11 Nov 2004 09:44:29 -0000      1.14
  +++ jk_logger.h       11 Nov 2004 11:57:56 -0000      1.15
  @@ -66,7 +66,7 @@
   #define JK_LOG_ERROR_VERB   "error"
   #define JK_LOG_EMERG_VERB   "emerg"
   
  -#if defined(__GCC__) || defined(_MSC_VER)
  +#if defined(__GNUC__) || defined(_MSC_VER)
   #define JK_LOG_TRACE   __FILE__,__LINE__,__FUNCTION__,JK_LOG_TRACE_LEVEL
   #define JK_LOG_DEBUG   __FILE__,__LINE__,__FUNCTION__,JK_LOG_DEBUG_LEVEL
   #define JK_LOG_ERROR   __FILE__,__LINE__,__FUNCTION__,JK_LOG_ERROR_LEVEL
  @@ -84,7 +84,7 @@
   
   /* Debug level is compile time only 
    */
  -#if defined (DEBUG) || (_DEBUG)
  +#if defined (DEBUG) || defined(_DEBUG)
   #define JK_TRACE    1
   #define JK_TRACE_ENTER(l) jk_log((l), JK_LOG_TRACE, "enter\n")
   #define JK_TRACE_EXIT(l)  jk_log((l), JK_LOG_TRACE, "exit\n")
  @@ -96,6 +96,11 @@
   
   #define JK_LOG_NULL_PARAMS(l) jk_log((l), JK_LOG_ERROR, "NULL parameters\n")
   
  +/* Debug level macro
  + * It is more efficient to check the level prior
  + * calling function that will not execute anyhow because of level
  + */
  +#define JK_IS_DEBUG_LEVEL(l)  ((l) && (l)->level <  JK_LOG_INFO_LEVEL)
   
   
   #ifdef __cplusplus
  
  
  

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

Reply via email to