Ticket #1698: ngx_log.h.patch

File ngx_log.h.patch, 1.3 KB (added by chronolaw@…, 8 years ago)
  • src/core/ngx_log.h

    # HG changeset patch
    # User chronolaw <chronolaw@gmail.com>
    # Date 1546242068 -28800
    #      Mon Dec 31 15:41:08 2018 +0800
    # Node ID 9add9ea779458ff11503b379cba6c85e4f86cfbe
    # Parent  6d15e452fa2eaf19408e24a0d0fcc3a31344a289
    Add parentheses in ngx_log_debug so that
    we can use multi debug levels.
    
    For example:
    ngx_log_debug2(
        NGX_LOG_DEBUG_HTTP|NGX_LOG_DEBUG_CONNECTION,...)
    
    diff -r 6d15e452fa2e -r 9add9ea77945 src/core/ngx_log.h
    a b  
    8989    const char *fmt, ...);
    9090
    9191#define ngx_log_debug(level, log, ...)                                        \
    92     if ((log)->log_level & level)                                             \
     92    if ((log)->log_level & (level))                                           \
    9393        ngx_log_error_core(NGX_LOG_DEBUG, log, __VA_ARGS__)
    9494
    9595/*********************************/
     
    105105    const char *fmt, ...);
    106106
    107107#define ngx_log_debug(level, log, args...)                                    \
    108     if ((log)->log_level & level)                                             \
     108    if ((log)->log_level & (level))                                           \
    109109        ngx_log_error_core(NGX_LOG_DEBUG, log, args)
    110110
    111111/*********************************/