diff options
author | Ruslan Ermilov <ru@nginx.com> | 2012-01-10 07:28:32 +0000 |
---|---|---|
committer | Ruslan Ermilov <ru@nginx.com> | 2012-01-10 07:28:32 +0000 |
commit | d55ce18c953ed46893f531e2d1ba6e4db6f7399d (patch) | |
tree | 73367652c13d18e8987fe7d35f51a58f2548fdeb /src | |
parent | 9d712d9bf108e97da709706b890002200109f43a (diff) | |
download | nginx-d55ce18c953ed46893f531e2d1ba6e4db6f7399d.tar.gz nginx-d55ce18c953ed46893f531e2d1ba6e4db6f7399d.zip |
Changed ngx_log_debugN() macros to verify the number of arguments
when built with debugging.
Diffstat (limited to 'src')
-rw-r--r-- | src/core/ngx_log.h | 41 |
1 files changed, 32 insertions, 9 deletions
diff --git a/src/core/ngx_log.h b/src/core/ngx_log.h index a55ef449c..9e00e30ee 100644 --- a/src/core/ngx_log.h +++ b/src/core/ngx_log.h @@ -121,15 +121,38 @@ void ngx_cdecl ngx_log_debug_core(ngx_log_t *log, ngx_err_t err, #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 */ |