annotate src/core/ngx_log.h @ 92:45945fa8b8ba NGINX_0_2_0

nginx 0.2.0 *) The pid-file names used during online upgrade was changed and now is not required a manual rename operation. The old master process adds the ".oldbin" suffix to its pid-file and executes a new binary file. The new master process creates usual pid-file without the ".newbin" suffix. If the master process exits, then old master process renames back its pid-file with the ".oldbin" suffix to the pid-file without suffix. *) Change: the "worker_connections" directive, new name of the "connections" directive; now the directive specifies maximum number of connections, but not maximum socket descriptor number. *) Feature: SSL supports the session cache inside one worker process. *) Feature: the "satisfy_any" directive. *) Change: the ngx_http_access_module and ngx_http_auth_basic_module do not run for subrequests. *) Feature: the "worker_rlimit_nofile" and "worker_rlimit_sigpending" directives. *) Bugfix: if all backend using in load-balancing failed after one error, then nginx did not try do connect to them during 60 seconds. *) Bugfix: in IMAP/POP3 command argument parsing. Thanks to Rob Mueller. *) Bugfix: errors while using SSL in IMAP/POP3 proxy. *) Bugfix: errors while using SSI and gzipping. *) Bugfix: the "Expires" and "Cache-Control" header lines were omitted from the 304 responses. Thanks to Alexandr Kukushkin.
author Igor Sysoev <http://sysoev.ru>
date Fri, 23 Sep 2005 00:00:00 +0400
parents 5db440287648
children 003bd800ec2a
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
44
4989c3d25945 nginx 0.1.22
Igor Sysoev <http://sysoev.ru>
parents: 42
diff changeset
50 ngx_atomic_uint_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...) \
92
45945fa8b8ba nginx 0.2.0
Igor Sysoev <http://sysoev.ru>
parents: 64
diff changeset
75 if ((log)->log_level >= level) ngx_log_error_core(level, log, args)
0
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,
48
6cfc63e68377 nginx 0.1.24
Igor Sysoev <http://sysoev.ru>
parents: 44
diff changeset
78 const char *fmt, ...);
0
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...) \
92
45945fa8b8ba nginx 0.2.0
Igor Sysoev <http://sysoev.ru>
parents: 64
diff changeset
81 if ((log)->log_level & level) \
32
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, ...) \
92
45945fa8b8ba nginx 0.2.0
Igor Sysoev <http://sysoev.ru>
parents: 64
diff changeset
91 if ((log)->log_level >= level) ngx_log_error_core(level, log, __VA_ARGS__)
0
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,
48
6cfc63e68377 nginx 0.1.24
Igor Sysoev <http://sysoev.ru>
parents: 44
diff changeset
94 const char *fmt, ...);
0
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, ...) \
92
45945fa8b8ba nginx 0.2.0
Igor Sysoev <http://sysoev.ru>
parents: 64
diff changeset
97 if ((log)->log_level & level) \
32
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
52
0d75d65c642f nginx 0.1.26
Igor Sysoev <http://sysoev.ru>
parents: 48
diff changeset
106 void ngx_cdecl ngx_log_error(ngx_uint_t level, ngx_log_t *log, ngx_err_t err,
48
6cfc63e68377 nginx 0.1.24
Igor Sysoev <http://sysoev.ru>
parents: 44
diff changeset
107 const char *fmt, ...);
0
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,
48
6cfc63e68377 nginx 0.1.24
Igor Sysoev <http://sysoev.ru>
parents: 44
diff changeset
109 const char *fmt, va_list args);
52
0d75d65c642f nginx 0.1.26
Igor Sysoev <http://sysoev.ru>
parents: 48
diff changeset
110 void ngx_cdecl ngx_log_debug_core(ngx_log_t *log, ngx_err_t err,
0d75d65c642f nginx 0.1.26
Igor Sysoev <http://sysoev.ru>
parents: 48
diff changeset
111 const char *fmt, ...);
0
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
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
114 #endif /* VARIADIC MACROS */
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
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
119 #if (NGX_DEBUG)
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
120
4
4b2dafa26fe2 nginx 0.1.2
Igor Sysoev <http://sysoev.ru>
parents: 0
diff changeset
121 #if (NGX_HAVE_VARIADIC_MACROS)
0
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
122
32
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
123 #define ngx_log_debug0 ngx_log_debug
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
124 #define ngx_log_debug1 ngx_log_debug
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
125 #define ngx_log_debug2 ngx_log_debug
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
126 #define ngx_log_debug3 ngx_log_debug
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
127 #define ngx_log_debug4 ngx_log_debug
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
128 #define ngx_log_debug5 ngx_log_debug
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
129 #define ngx_log_debug6 ngx_log_debug
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
130 #define ngx_log_debug7 ngx_log_debug
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
131 #define ngx_log_debug8 ngx_log_debug
0
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
132
64
5db440287648 nginx 0.1.32
Igor Sysoev <http://sysoev.ru>
parents: 52
diff changeset
133
0
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
134 #else /* NO VARIADIC MACROS */
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
135
32
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
136 #define ngx_log_debug0(level, log, err, fmt) \
92
45945fa8b8ba nginx 0.2.0
Igor Sysoev <http://sysoev.ru>
parents: 64
diff changeset
137 if ((log)->log_level & level) \
0
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
138 ngx_log_debug_core(log, err, fmt)
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
139
32
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
140 #define ngx_log_debug1(level, log, err, fmt, arg1) \
92
45945fa8b8ba nginx 0.2.0
Igor Sysoev <http://sysoev.ru>
parents: 64
diff changeset
141 if ((log)->log_level & level) \
0
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
142 ngx_log_debug_core(log, err, fmt, arg1)
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
143
32
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
144 #define ngx_log_debug2(level, log, err, fmt, arg1, arg2) \
92
45945fa8b8ba nginx 0.2.0
Igor Sysoev <http://sysoev.ru>
parents: 64
diff changeset
145 if ((log)->log_level & level) \
0
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
146 ngx_log_debug_core(log, err, fmt, arg1, arg2)
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
147
32
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
148 #define ngx_log_debug3(level, log, err, fmt, arg1, arg2, arg3) \
92
45945fa8b8ba nginx 0.2.0
Igor Sysoev <http://sysoev.ru>
parents: 64
diff changeset
149 if ((log)->log_level & level) \
0
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
150 ngx_log_debug_core(log, err, fmt, arg1, arg2, arg3)
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
151
32
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
152 #define ngx_log_debug4(level, log, err, fmt, arg1, arg2, arg3, arg4) \
92
45945fa8b8ba nginx 0.2.0
Igor Sysoev <http://sysoev.ru>
parents: 64
diff changeset
153 if ((log)->log_level & level) \
0
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
154 ngx_log_debug_core(log, err, fmt, arg1, arg2, arg3, arg4)
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
155
32
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
156 #define ngx_log_debug5(level, log, err, fmt, arg1, arg2, arg3, arg4, arg5) \
92
45945fa8b8ba nginx 0.2.0
Igor Sysoev <http://sysoev.ru>
parents: 64
diff changeset
157 if ((log)->log_level & level) \
0
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
158 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
159
32
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
160 #define ngx_log_debug6(level, log, err, fmt, \
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
161 arg1, arg2, arg3, arg4, arg5, arg6) \
92
45945fa8b8ba nginx 0.2.0
Igor Sysoev <http://sysoev.ru>
parents: 64
diff changeset
162 if ((log)->log_level & level) \
0
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
163 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
164
32
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
165 #define ngx_log_debug7(level, log, err, fmt, \
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
166 arg1, arg2, arg3, arg4, arg5, arg6, arg7) \
92
45945fa8b8ba nginx 0.2.0
Igor Sysoev <http://sysoev.ru>
parents: 64
diff changeset
167 if ((log)->log_level & level) \
32
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
168 ngx_log_debug_core(log, err, fmt, \
0
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
169 arg1, arg2, arg3, arg4, arg5, arg6, arg7)
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
170
32
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
171 #define ngx_log_debug8(level, log, err, fmt, \
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
172 arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) \
92
45945fa8b8ba nginx 0.2.0
Igor Sysoev <http://sysoev.ru>
parents: 64
diff changeset
173 if ((log)->log_level & level) \
32
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
174 ngx_log_debug_core(log, err, fmt, \
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
175 arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8)
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
176
0
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
177 #endif
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 #else /* NO NGX_DEBUG */
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
180
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
181 #define ngx_log_debug0(level, log, err, fmt)
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
182 #define ngx_log_debug1(level, log, err, fmt, arg1)
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
183 #define ngx_log_debug2(level, log, err, fmt, arg1, arg2)
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
184 #define ngx_log_debug3(level, log, err, fmt, arg1, arg2, arg3)
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
185 #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
186 #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
187 #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
188 #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
189 arg6, arg7)
32
da8c190bdaba nginx 0.1.16
Igor Sysoev <http://sysoev.ru>
parents: 10
diff changeset
190 #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
191 arg6, arg7, arg8)
0
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 #endif
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 /*********************************/
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
196
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
197 #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
198 #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
199
48
6cfc63e68377 nginx 0.1.24
Igor Sysoev <http://sysoev.ru>
parents: 44
diff changeset
200 ngx_log_t *ngx_log_init(void);
0
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
201 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
202 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
203
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
204
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
205 extern ngx_module_t ngx_errlog_module;
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
f0b350454894 nginx 0.1.0
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
208 #endif /* _NGX_LOG_H_INCLUDED_ */