# HG changeset patch # User Maxim Dounin # Date 1328468812 0 # Node ID 50445a6d469e0978c1a856f3ebcbb3c662249934 # Parent 2d3fc637fc482581b1902a886e8df05d418338de Merge of r4398: Changed ngx_log_debugN() macros to verify the number of arguments when built with debugging. diff --git a/src/core/ngx_log.h b/src/core/ngx_log.h --- a/src/core/ngx_log.h +++ b/src/core/ngx_log.h @@ -121,15 +121,38 @@ void ngx_cdecl ngx_log_debug_core(ngx_lo #if (NGX_HAVE_VARIADIC_MACROS) -#define ngx_log_debug0 ngx_log_debug -#define ngx_log_debug1 ngx_log_debug -#define ngx_log_debug2 ngx_log_debug -#define ngx_log_debug3 ngx_log_debug -#define ngx_log_debug4 ngx_log_debug -#define ngx_log_debug5 ngx_log_debug -#define ngx_log_debug6 ngx_log_debug -#define ngx_log_debug7 ngx_log_debug -#define ngx_log_debug8 ngx_log_debug +#define ngx_log_debug0(level, log, err, fmt) \ + ngx_log_debug(level, log, err, fmt) + +#define ngx_log_debug1(level, log, err, fmt, arg1) \ + ngx_log_debug(level, log, err, fmt, arg1) + +#define ngx_log_debug2(level, log, err, fmt, arg1, arg2) \ + ngx_log_debug(level, log, err, fmt, arg1, arg2) + +#define ngx_log_debug3(level, log, err, fmt, arg1, arg2, arg3) \ + ngx_log_debug(level, log, err, fmt, arg1, arg2, arg3) + +#define ngx_log_debug4(level, log, err, fmt, arg1, arg2, arg3, arg4) \ + ngx_log_debug(level, log, err, fmt, arg1, arg2, arg3, arg4) + +#define ngx_log_debug5(level, log, err, fmt, arg1, arg2, arg3, arg4, arg5) \ + ngx_log_debug(level, log, err, fmt, arg1, arg2, arg3, arg4, arg5) + +#define ngx_log_debug6(level, log, err, fmt, \ + arg1, arg2, arg3, arg4, arg5, arg6) \ + ngx_log_debug(level, log, err, fmt, \ + arg1, arg2, arg3, arg4, arg5, arg6) + +#define ngx_log_debug7(level, log, err, fmt, \ + arg1, arg2, arg3, arg4, arg5, arg6, arg7) \ + ngx_log_debug(level, log, err, fmt, \ + arg1, arg2, arg3, arg4, arg5, arg6, arg7) + +#define ngx_log_debug8(level, log, err, fmt, \ + arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) \ + ngx_log_debug(level, log, err, fmt, \ + arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) #else /* NO VARIADIC MACROS */