annotate src/core/ngx_log.h @ 42:41ccba1aba45 NGINX_0_1_21

nginx 0.1.21 *) Bugfix: the ngx_http_stub_status_module showed incorrect statistics if "rtsig" method was used or if several worker process ran on SMP. *) Bugfix: nginx could not be built by the icc compiler on Linux or if the zlib-1.2.x library was building from sources. *) Bugfix: nginx could not be built on NetBSD 2.0.
author Igor Sysoev <http://sysoev.ru>
date Tue, 22 Feb 2005 00:00:00 +0300
parents da8c190bdaba
children 4989c3d25945
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
1
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
2 /*
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
3 * Copyright (C) Igor Sysoev
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
4 */
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
5
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
6
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
7 #ifndef _NGX_LOG_H_INCLUDED_
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
8 #define _NGX_LOG_H_INCLUDED_
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
9
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
10
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
11 #include <ngx_config.h>
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
12 #include <ngx_core.h>
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
13
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
14
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
15 #define NGX_LOG_STDERR 0
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
16 #define NGX_LOG_EMERG 1
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
17 #define NGX_LOG_ALERT 2
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
18 #define NGX_LOG_CRIT 3
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
19 #define NGX_LOG_ERR 4
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
20 #define NGX_LOG_WARN 5
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
21 #define NGX_LOG_NOTICE 6
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
22 #define NGX_LOG_INFO 7
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
23 #define NGX_LOG_DEBUG 8
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
24
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
25 #define NGX_LOG_DEBUG_CORE 0x010
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
26 #define NGX_LOG_DEBUG_ALLOC 0x020
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
27 #define NGX_LOG_DEBUG_MUTEX 0x040
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
28 #define NGX_LOG_DEBUG_EVENT 0x080
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
29 #define NGX_LOG_DEBUG_HTTP 0x100
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
30 #define NGX_LOG_DEBUG_IMAP 0x200
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
31
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
32 /*
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
33 * do not forget to update debug_levels[] in src/core/ngx_log.c
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
34 * after the adding a new debug level
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
35 */
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
36
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
37 #define NGX_LOG_DEBUG_FIRST NGX_LOG_DEBUG_CORE
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
38 #define NGX_LOG_DEBUG_LAST NGX_LOG_DEBUG_IMAP
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
39 #define NGX_LOG_DEBUG_CONNECTION 0x80000000
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
40 #define NGX_LOG_DEBUG_ALL 0x7ffffff0
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
41
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
42
32
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
43 typedef u_char *(*ngx_log_handler_pt) (ngx_log_t *log, u_char *buf, size_t len);
0
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
44
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
45
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
46 struct ngx_log_s {
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
47 ngx_uint_t log_level;
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
48 ngx_open_file_t *file;
32
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
49
42
41ccba1aba45 nginx 0.1.21
Igor Sysoev <http://sysoev.ru>
parents: 32
diff changeset
50 ngx_atomic_int_t connection;
32
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
51
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
52 ngx_log_handler_pt handler;
0
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
53 void *data;
32
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
54
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
55 /*
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
56 * we declare "action" as "char *" because the actions are usually
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
57 * the static strings and in the "u_char *" case we have to override
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
58 * their types all the time
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
59 */
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
60
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
61 char *action;
0
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
62 };
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
63
10
46833bd150cb nginx 0.1.5
Igor Sysoev <http://sysoev.ru>
parents: 4
diff changeset
64
46833bd150cb nginx 0.1.5
Igor Sysoev <http://sysoev.ru>
parents: 4
diff changeset
65 #define NGX_MAX_ERROR_STR 2048
0
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
66
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
67
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
68 /*********************************/
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
69
4
4b2dafa26fe2 nginx 0.1.2
Igor Sysoev <http://sysoev.ru>
parents: 0
diff changeset
70 #if (NGX_HAVE_GCC_VARIADIC_MACROS)
0
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
71
4
4b2dafa26fe2 nginx 0.1.2
Igor Sysoev <http://sysoev.ru>
parents: 0
diff changeset
72 #define NGX_HAVE_VARIADIC_MACROS 1
0
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
73
32
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
74 #define ngx_log_error(level, log, args...) \
0
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
75 if (log->log_level >= level) ngx_log_error_core(level, log, args)
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
76
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
77 void ngx_log_error_core(ngx_uint_t level, ngx_log_t *log, ngx_err_t err,
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
78 const char *fmt, ...);
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
79
32
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
80 #define ngx_log_debug(level, log, args...) \
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
81 if (log->log_level & level) \
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
82 ngx_log_error_core(NGX_LOG_DEBUG, log, args)
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
83
0
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
84 /*********************************/
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
85
4
4b2dafa26fe2 nginx 0.1.2
Igor Sysoev <http://sysoev.ru>
parents: 0
diff changeset
86 #elif (NGX_HAVE_C99_VARIADIC_MACROS)
0
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
87
4
4b2dafa26fe2 nginx 0.1.2
Igor Sysoev <http://sysoev.ru>
parents: 0
diff changeset
88 #define NGX_HAVE_VARIADIC_MACROS 1
0
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
89
32
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
90 #define ngx_log_error(level, log, ...) \
0
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
91 if (log->log_level >= level) ngx_log_error_core(level, log, __VA_ARGS__)
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
92
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
93 void ngx_log_error_core(ngx_uint_t level, ngx_log_t *log, ngx_err_t err,
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
94 const char *fmt, ...);
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
95
32
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
96 #define ngx_log_debug(level, log, ...) \
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
97 if (log->log_level & level) \
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
98 ngx_log_error_core(NGX_LOG_DEBUG, log, __VA_ARGS__)
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
99
0
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
100 /*********************************/
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
101
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
102 #else /* NO VARIADIC MACROS */
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
103
4
4b2dafa26fe2 nginx 0.1.2
Igor Sysoev <http://sysoev.ru>
parents: 0
diff changeset
104 #define NGX_HAVE_VARIADIC_MACROS 0
0
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
105
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
106 void ngx_log_error(ngx_uint_t level, ngx_log_t *log, ngx_err_t err,
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
107 const char *fmt, ...);
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
108 void ngx_log_error_core(ngx_uint_t level, ngx_log_t *log, ngx_err_t err,
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
109 const char *fmt, va_list args);
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
110 void ngx_log_debug_core(ngx_log_t *log, ngx_err_t err, const char *fmt, ...);
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
111
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
112
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
113 #endif /* VARIADIC MACROS */
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
114
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
115
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
116 /*********************************/
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
117
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
118 #if (NGX_DEBUG)
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
119
4
4b2dafa26fe2 nginx 0.1.2
Igor Sysoev <http://sysoev.ru>
parents: 0
diff changeset
120 #if (NGX_HAVE_VARIADIC_MACROS)
0
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
121
32
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
122 #define ngx_log_debug0 ngx_log_debug
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
123 #define ngx_log_debug1 ngx_log_debug
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
124 #define ngx_log_debug2 ngx_log_debug
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
125 #define ngx_log_debug3 ngx_log_debug
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
126 #define ngx_log_debug4 ngx_log_debug
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
127 #define ngx_log_debug5 ngx_log_debug
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
128 #define ngx_log_debug6 ngx_log_debug
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
129 #define ngx_log_debug7 ngx_log_debug
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
130 #define ngx_log_debug8 ngx_log_debug
0
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
131
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
132 #else /* NO VARIADIC MACROS */
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
133
32
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
134 #define ngx_log_debug0(level, log, err, fmt) \
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
135 if (log->log_level & level) \
0
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
136 ngx_log_debug_core(log, err, fmt)
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
137
32
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
138 #define ngx_log_debug1(level, log, err, fmt, arg1) \
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
139 if (log->log_level & level) \
0
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
140 ngx_log_debug_core(log, err, fmt, arg1)
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
141
32
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
142 #define ngx_log_debug2(level, log, err, fmt, arg1, arg2) \
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
143 if (log->log_level & level) \
0
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
144 ngx_log_debug_core(log, err, fmt, arg1, arg2)
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
145
32
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
146 #define ngx_log_debug3(level, log, err, fmt, arg1, arg2, arg3) \
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
147 if (log->log_level & level) \
0
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
148 ngx_log_debug_core(log, err, fmt, arg1, arg2, arg3)
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
149
32
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
150 #define ngx_log_debug4(level, log, err, fmt, arg1, arg2, arg3, arg4) \
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
151 if (log->log_level & level) \
0
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
152 ngx_log_debug_core(log, err, fmt, arg1, arg2, arg3, arg4)
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
153
32
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
154 #define ngx_log_debug5(level, log, err, fmt, arg1, arg2, arg3, arg4, arg5) \
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
155 if (log->log_level & level) \
0
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
156 ngx_log_debug_core(log, err, fmt, arg1, arg2, arg3, arg4, arg5)
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
157
32
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
158 #define ngx_log_debug6(level, log, err, fmt, \
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
159 arg1, arg2, arg3, arg4, arg5, arg6) \
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
160 if (log->log_level & level) \
0
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
161 ngx_log_debug_core(log, err, fmt, arg1, arg2, arg3, arg4, arg5, arg6)
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
162
32
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
163 #define ngx_log_debug7(level, log, err, fmt, \
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
164 arg1, arg2, arg3, arg4, arg5, arg6, arg7) \
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
165 if (log->log_level & level) \
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
166 ngx_log_debug_core(log, err, fmt, \
0
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
167 arg1, arg2, arg3, arg4, arg5, arg6, arg7)
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
168
32
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
169 #define ngx_log_debug8(level, log, err, fmt, \
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
170 arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) \
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
171 if (log->log_level & level) \
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
172 ngx_log_debug_core(log, err, fmt, \
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
173 arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8)
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
174
0
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
175 #endif
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
176
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
177 #else /* NO NGX_DEBUG */
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
178
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
179 #define ngx_log_debug0(level, log, err, fmt)
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
180 #define ngx_log_debug1(level, log, err, fmt, arg1)
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
181 #define ngx_log_debug2(level, log, err, fmt, arg1, arg2)
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
182 #define ngx_log_debug3(level, log, err, fmt, arg1, arg2, arg3)
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
183 #define ngx_log_debug4(level, log, err, fmt, arg1, arg2, arg3, arg4)
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
184 #define ngx_log_debug5(level, log, err, fmt, arg1, arg2, arg3, arg4, arg5)
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
185 #define ngx_log_debug6(level, log, err, fmt, arg1, arg2, arg3, arg4, arg5, arg6)
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
186 #define ngx_log_debug7(level, log, err, fmt, arg1, arg2, arg3, arg4, arg5, \
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
187 arg6, arg7)
32
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
188 #define ngx_log_debug8(level, log, err, fmt, arg1, arg2, arg3, arg4, arg5, \
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
189 arg6, arg7, arg8)
0
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
190
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
191 #endif
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
192
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
193 /*********************************/
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
194
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
195 #define ngx_log_alloc_log(pool, log) ngx_palloc(pool, log, sizeof(ngx_log_t))
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
196 #define ngx_log_copy_log(new, old) ngx_memcpy(new, old, sizeof(ngx_log_t))
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
197
10
46833bd150cb nginx 0.1.5
Igor Sysoev <http://sysoev.ru>
parents: 4
diff changeset
198 ngx_log_t *ngx_log_init();
0
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
199 ngx_log_t *ngx_log_create_errlog(ngx_cycle_t *cycle, ngx_array_t *args);
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
200 char *ngx_set_error_log_levels(ngx_conf_t *cf, ngx_log_t *log);
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
201
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
202
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
203
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
204 extern ngx_module_t ngx_errlog_module;
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
205
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
206
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
207 #endif /* _NGX_LOG_H_INCLUDED_ */