Mercurial > hg > nginx-quic
annotate src/core/ngx_log.h @ 5668:64958ea92fd2
Missed comma fixed. A couple of Latin symbols plugged into
Russian text changed to Russian counterparts.
author | Maxim Konovalov <maxim@nginx.com> |
---|---|
date | Wed, 23 Apr 2014 16:00:59 +0000 |
parents | e088695737c3 |
children | 777202558122 |
rev | line source |
---|---|
441
da8c5707af39
nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents:
426
diff
changeset
|
1 |
da8c5707af39
nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents:
426
diff
changeset
|
2 /* |
444
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
441
diff
changeset
|
3 * Copyright (C) Igor Sysoev |
4412 | 4 * Copyright (C) Nginx, Inc. |
441
da8c5707af39
nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents:
426
diff
changeset
|
5 */ |
da8c5707af39
nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents:
426
diff
changeset
|
6 |
da8c5707af39
nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents:
426
diff
changeset
|
7 |
0
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
8 #ifndef _NGX_LOG_H_INCLUDED_ |
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
9 #define _NGX_LOG_H_INCLUDED_ |
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
10 |
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
11 |
100
7ebc8b7fb816
nginx-0.0.1-2003-06-03-19:42:58 import
Igor Sysoev <igor@sysoev.ru>
parents:
92
diff
changeset
|
12 #include <ngx_config.h> |
7ebc8b7fb816
nginx-0.0.1-2003-06-03-19:42:58 import
Igor Sysoev <igor@sysoev.ru>
parents:
92
diff
changeset
|
13 #include <ngx_core.h> |
7ebc8b7fb816
nginx-0.0.1-2003-06-03-19:42:58 import
Igor Sysoev <igor@sysoev.ru>
parents:
92
diff
changeset
|
14 |
0
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
15 |
307
ce375c313e96
nginx-0.0.3-2004-04-08-19:58:25 import
Igor Sysoev <igor@sysoev.ru>
parents:
278
diff
changeset
|
16 #define NGX_LOG_STDERR 0 |
ce375c313e96
nginx-0.0.3-2004-04-08-19:58:25 import
Igor Sysoev <igor@sysoev.ru>
parents:
278
diff
changeset
|
17 #define NGX_LOG_EMERG 1 |
ce375c313e96
nginx-0.0.3-2004-04-08-19:58:25 import
Igor Sysoev <igor@sysoev.ru>
parents:
278
diff
changeset
|
18 #define NGX_LOG_ALERT 2 |
ce375c313e96
nginx-0.0.3-2004-04-08-19:58:25 import
Igor Sysoev <igor@sysoev.ru>
parents:
278
diff
changeset
|
19 #define NGX_LOG_CRIT 3 |
ce375c313e96
nginx-0.0.3-2004-04-08-19:58:25 import
Igor Sysoev <igor@sysoev.ru>
parents:
278
diff
changeset
|
20 #define NGX_LOG_ERR 4 |
ce375c313e96
nginx-0.0.3-2004-04-08-19:58:25 import
Igor Sysoev <igor@sysoev.ru>
parents:
278
diff
changeset
|
21 #define NGX_LOG_WARN 5 |
ce375c313e96
nginx-0.0.3-2004-04-08-19:58:25 import
Igor Sysoev <igor@sysoev.ru>
parents:
278
diff
changeset
|
22 #define NGX_LOG_NOTICE 6 |
ce375c313e96
nginx-0.0.3-2004-04-08-19:58:25 import
Igor Sysoev <igor@sysoev.ru>
parents:
278
diff
changeset
|
23 #define NGX_LOG_INFO 7 |
ce375c313e96
nginx-0.0.3-2004-04-08-19:58:25 import
Igor Sysoev <igor@sysoev.ru>
parents:
278
diff
changeset
|
24 #define NGX_LOG_DEBUG 8 |
201
267ea1d98683
nginx-0.0.1-2003-11-30-23:03:18 import
Igor Sysoev <igor@sysoev.ru>
parents:
191
diff
changeset
|
25 |
379
73688d5d7fc3
nginx-0.0.7-2004-07-06-20:12:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
307
diff
changeset
|
26 #define NGX_LOG_DEBUG_CORE 0x010 |
73688d5d7fc3
nginx-0.0.7-2004-07-06-20:12:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
307
diff
changeset
|
27 #define NGX_LOG_DEBUG_ALLOC 0x020 |
73688d5d7fc3
nginx-0.0.7-2004-07-06-20:12:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
307
diff
changeset
|
28 #define NGX_LOG_DEBUG_MUTEX 0x040 |
73688d5d7fc3
nginx-0.0.7-2004-07-06-20:12:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
307
diff
changeset
|
29 #define NGX_LOG_DEBUG_EVENT 0x080 |
73688d5d7fc3
nginx-0.0.7-2004-07-06-20:12:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
307
diff
changeset
|
30 #define NGX_LOG_DEBUG_HTTP 0x100 |
1136 | 31 #define NGX_LOG_DEBUG_MAIL 0x200 |
645 | 32 #define NGX_LOG_DEBUG_MYSQL 0x400 |
417
0526206251f6
nginx-0.0.10-2004-09-07-19:29:22 import
Igor Sysoev <igor@sysoev.ru>
parents:
389
diff
changeset
|
33 |
0526206251f6
nginx-0.0.10-2004-09-07-19:29:22 import
Igor Sysoev <igor@sysoev.ru>
parents:
389
diff
changeset
|
34 /* |
441
da8c5707af39
nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents:
426
diff
changeset
|
35 * do not forget to update debug_levels[] in src/core/ngx_log.c |
da8c5707af39
nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents:
426
diff
changeset
|
36 * after the adding a new debug level |
417
0526206251f6
nginx-0.0.10-2004-09-07-19:29:22 import
Igor Sysoev <igor@sysoev.ru>
parents:
389
diff
changeset
|
37 */ |
208
0b67be7d4489
nginx-0.0.1-2003-12-08-23:48:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
201
diff
changeset
|
38 |
307
ce375c313e96
nginx-0.0.3-2004-04-08-19:58:25 import
Igor Sysoev <igor@sysoev.ru>
parents:
278
diff
changeset
|
39 #define NGX_LOG_DEBUG_FIRST NGX_LOG_DEBUG_CORE |
1136 | 40 #define NGX_LOG_DEBUG_LAST NGX_LOG_DEBUG_MYSQL |
307
ce375c313e96
nginx-0.0.3-2004-04-08-19:58:25 import
Igor Sysoev <igor@sysoev.ru>
parents:
278
diff
changeset
|
41 #define NGX_LOG_DEBUG_CONNECTION 0x80000000 |
ce375c313e96
nginx-0.0.3-2004-04-08-19:58:25 import
Igor Sysoev <igor@sysoev.ru>
parents:
278
diff
changeset
|
42 #define NGX_LOG_DEBUG_ALL 0x7ffffff0 |
0
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
43 |
92
19cc647ecd91
nginx-0.0.1-2003-05-20-19:37:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
57
diff
changeset
|
44 |
483 | 45 typedef u_char *(*ngx_log_handler_pt) (ngx_log_t *log, u_char *buf, size_t len); |
160
e7e094d34162
nginx-0.0.1-2003-10-27-11:53:49 import
Igor Sysoev <igor@sysoev.ru>
parents:
115
diff
changeset
|
46 |
e7e094d34162
nginx-0.0.1-2003-10-27-11:53:49 import
Igor Sysoev <igor@sysoev.ru>
parents:
115
diff
changeset
|
47 |
191
71ce40b3c37b
nginx-0.0.1-2003-11-19-19:26:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
48 struct ngx_log_s { |
257
70e1c7d2b83d
nginx-0.0.2-2004-02-11-20:08:49 import
Igor Sysoev <igor@sysoev.ru>
parents:
234
diff
changeset
|
49 ngx_uint_t log_level; |
160
e7e094d34162
nginx-0.0.1-2003-10-27-11:53:49 import
Igor Sysoev <igor@sysoev.ru>
parents:
115
diff
changeset
|
50 ngx_open_file_t *file; |
483 | 51 |
495 | 52 ngx_atomic_uint_t connection; |
483 | 53 |
54 ngx_log_handler_pt handler; | |
160
e7e094d34162
nginx-0.0.1-2003-10-27-11:53:49 import
Igor Sysoev <igor@sysoev.ru>
parents:
115
diff
changeset
|
55 void *data; |
483 | 56 |
57 /* | |
58 * we declare "action" as "char *" because the actions are usually | |
59 * the static strings and in the "u_char *" case we have to override | |
60 * their types all the time | |
61 */ | |
62 | |
63 char *action; | |
5254
7ecaa9e4bf1b
Core: support several "error_log" directives.
Vladimir Homutov <vl@nginx.com>
parents:
4412
diff
changeset
|
64 |
7ecaa9e4bf1b
Core: support several "error_log" directives.
Vladimir Homutov <vl@nginx.com>
parents:
4412
diff
changeset
|
65 ngx_log_t *next; |
191
71ce40b3c37b
nginx-0.0.1-2003-11-19-19:26:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
66 }; |
0
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
67 |
461 | 68 |
69 #define NGX_MAX_ERROR_STR 2048 | |
0
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
70 |
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
71 |
201
267ea1d98683
nginx-0.0.1-2003-11-30-23:03:18 import
Igor Sysoev <igor@sysoev.ru>
parents:
191
diff
changeset
|
72 /*********************************/ |
267ea1d98683
nginx-0.0.1-2003-11-30-23:03:18 import
Igor Sysoev <igor@sysoev.ru>
parents:
191
diff
changeset
|
73 |
3673
e27070fb6c6b
try to use C99 variadic macros first:
Igor Sysoev <igor@sysoev.ru>
parents:
2785
diff
changeset
|
74 #if (NGX_HAVE_C99_VARIADIC_MACROS) |
e27070fb6c6b
try to use C99 variadic macros first:
Igor Sysoev <igor@sysoev.ru>
parents:
2785
diff
changeset
|
75 |
e27070fb6c6b
try to use C99 variadic macros first:
Igor Sysoev <igor@sysoev.ru>
parents:
2785
diff
changeset
|
76 #define NGX_HAVE_VARIADIC_MACROS 1 |
e27070fb6c6b
try to use C99 variadic macros first:
Igor Sysoev <igor@sysoev.ru>
parents:
2785
diff
changeset
|
77 |
e27070fb6c6b
try to use C99 variadic macros first:
Igor Sysoev <igor@sysoev.ru>
parents:
2785
diff
changeset
|
78 #define ngx_log_error(level, log, ...) \ |
e27070fb6c6b
try to use C99 variadic macros first:
Igor Sysoev <igor@sysoev.ru>
parents:
2785
diff
changeset
|
79 if ((log)->log_level >= level) ngx_log_error_core(level, log, __VA_ARGS__) |
e27070fb6c6b
try to use C99 variadic macros first:
Igor Sysoev <igor@sysoev.ru>
parents:
2785
diff
changeset
|
80 |
e27070fb6c6b
try to use C99 variadic macros first:
Igor Sysoev <igor@sysoev.ru>
parents:
2785
diff
changeset
|
81 void ngx_log_error_core(ngx_uint_t level, ngx_log_t *log, ngx_err_t err, |
e27070fb6c6b
try to use C99 variadic macros first:
Igor Sysoev <igor@sysoev.ru>
parents:
2785
diff
changeset
|
82 const char *fmt, ...); |
e27070fb6c6b
try to use C99 variadic macros first:
Igor Sysoev <igor@sysoev.ru>
parents:
2785
diff
changeset
|
83 |
e27070fb6c6b
try to use C99 variadic macros first:
Igor Sysoev <igor@sysoev.ru>
parents:
2785
diff
changeset
|
84 #define ngx_log_debug(level, log, ...) \ |
e27070fb6c6b
try to use C99 variadic macros first:
Igor Sysoev <igor@sysoev.ru>
parents:
2785
diff
changeset
|
85 if ((log)->log_level & level) \ |
e27070fb6c6b
try to use C99 variadic macros first:
Igor Sysoev <igor@sysoev.ru>
parents:
2785
diff
changeset
|
86 ngx_log_error_core(NGX_LOG_DEBUG, log, __VA_ARGS__) |
e27070fb6c6b
try to use C99 variadic macros first:
Igor Sysoev <igor@sysoev.ru>
parents:
2785
diff
changeset
|
87 |
e27070fb6c6b
try to use C99 variadic macros first:
Igor Sysoev <igor@sysoev.ru>
parents:
2785
diff
changeset
|
88 /*********************************/ |
e27070fb6c6b
try to use C99 variadic macros first:
Igor Sysoev <igor@sysoev.ru>
parents:
2785
diff
changeset
|
89 |
e27070fb6c6b
try to use C99 variadic macros first:
Igor Sysoev <igor@sysoev.ru>
parents:
2785
diff
changeset
|
90 #elif (NGX_HAVE_GCC_VARIADIC_MACROS) |
0
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
91 |
455 | 92 #define NGX_HAVE_VARIADIC_MACROS 1 |
0
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
93 |
483 | 94 #define ngx_log_error(level, log, args...) \ |
543 | 95 if ((log)->log_level >= level) ngx_log_error_core(level, log, args) |
0
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
96 |
278
0ba4821f4460
nginx-0.0.2-2004-03-04-10:04:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
277
diff
changeset
|
97 void ngx_log_error_core(ngx_uint_t level, ngx_log_t *log, ngx_err_t err, |
499 | 98 const char *fmt, ...); |
0
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
99 |
483 | 100 #define ngx_log_debug(level, log, args...) \ |
543 | 101 if ((log)->log_level & level) \ |
483 | 102 ngx_log_error_core(NGX_LOG_DEBUG, log, args) |
103 | |
201
267ea1d98683
nginx-0.0.1-2003-11-30-23:03:18 import
Igor Sysoev <igor@sysoev.ru>
parents:
191
diff
changeset
|
104 /*********************************/ |
92
19cc647ecd91
nginx-0.0.1-2003-05-20-19:37:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
57
diff
changeset
|
105 |
0
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
106 #else /* NO VARIADIC MACROS */ |
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
107 |
455 | 108 #define NGX_HAVE_VARIADIC_MACROS 0 |
201
267ea1d98683
nginx-0.0.1-2003-11-30-23:03:18 import
Igor Sysoev <igor@sysoev.ru>
parents:
191
diff
changeset
|
109 |
503 | 110 void ngx_cdecl ngx_log_error(ngx_uint_t level, ngx_log_t *log, ngx_err_t err, |
499 | 111 const char *fmt, ...); |
278
0ba4821f4460
nginx-0.0.2-2004-03-04-10:04:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
277
diff
changeset
|
112 void ngx_log_error_core(ngx_uint_t level, ngx_log_t *log, ngx_err_t err, |
499 | 113 const char *fmt, va_list args); |
503 | 114 void ngx_cdecl ngx_log_debug_core(ngx_log_t *log, ngx_err_t err, |
115 const char *fmt, ...); | |
0
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
116 |
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
117 |
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
118 #endif /* VARIADIC MACROS */ |
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
119 |
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
120 |
201
267ea1d98683
nginx-0.0.1-2003-11-30-23:03:18 import
Igor Sysoev <igor@sysoev.ru>
parents:
191
diff
changeset
|
121 /*********************************/ |
267ea1d98683
nginx-0.0.1-2003-11-30-23:03:18 import
Igor Sysoev <igor@sysoev.ru>
parents:
191
diff
changeset
|
122 |
277
e91499541410
nginx-0.0.2-2004-03-03-19:14:15 import
Igor Sysoev <igor@sysoev.ru>
parents:
257
diff
changeset
|
123 #if (NGX_DEBUG) |
e91499541410
nginx-0.0.2-2004-03-03-19:14:15 import
Igor Sysoev <igor@sysoev.ru>
parents:
257
diff
changeset
|
124 |
455 | 125 #if (NGX_HAVE_VARIADIC_MACROS) |
201
267ea1d98683
nginx-0.0.1-2003-11-30-23:03:18 import
Igor Sysoev <igor@sysoev.ru>
parents:
191
diff
changeset
|
126 |
4397
d3000365ac65
Changed ngx_log_debugN() macros to verify the number of arguments
Ruslan Ermilov <ru@nginx.com>
parents:
4283
diff
changeset
|
127 #define ngx_log_debug0(level, log, err, fmt) \ |
d3000365ac65
Changed ngx_log_debugN() macros to verify the number of arguments
Ruslan Ermilov <ru@nginx.com>
parents:
4283
diff
changeset
|
128 ngx_log_debug(level, log, err, fmt) |
d3000365ac65
Changed ngx_log_debugN() macros to verify the number of arguments
Ruslan Ermilov <ru@nginx.com>
parents:
4283
diff
changeset
|
129 |
d3000365ac65
Changed ngx_log_debugN() macros to verify the number of arguments
Ruslan Ermilov <ru@nginx.com>
parents:
4283
diff
changeset
|
130 #define ngx_log_debug1(level, log, err, fmt, arg1) \ |
d3000365ac65
Changed ngx_log_debugN() macros to verify the number of arguments
Ruslan Ermilov <ru@nginx.com>
parents:
4283
diff
changeset
|
131 ngx_log_debug(level, log, err, fmt, arg1) |
d3000365ac65
Changed ngx_log_debugN() macros to verify the number of arguments
Ruslan Ermilov <ru@nginx.com>
parents:
4283
diff
changeset
|
132 |
d3000365ac65
Changed ngx_log_debugN() macros to verify the number of arguments
Ruslan Ermilov <ru@nginx.com>
parents:
4283
diff
changeset
|
133 #define ngx_log_debug2(level, log, err, fmt, arg1, arg2) \ |
d3000365ac65
Changed ngx_log_debugN() macros to verify the number of arguments
Ruslan Ermilov <ru@nginx.com>
parents:
4283
diff
changeset
|
134 ngx_log_debug(level, log, err, fmt, arg1, arg2) |
d3000365ac65
Changed ngx_log_debugN() macros to verify the number of arguments
Ruslan Ermilov <ru@nginx.com>
parents:
4283
diff
changeset
|
135 |
d3000365ac65
Changed ngx_log_debugN() macros to verify the number of arguments
Ruslan Ermilov <ru@nginx.com>
parents:
4283
diff
changeset
|
136 #define ngx_log_debug3(level, log, err, fmt, arg1, arg2, arg3) \ |
d3000365ac65
Changed ngx_log_debugN() macros to verify the number of arguments
Ruslan Ermilov <ru@nginx.com>
parents:
4283
diff
changeset
|
137 ngx_log_debug(level, log, err, fmt, arg1, arg2, arg3) |
d3000365ac65
Changed ngx_log_debugN() macros to verify the number of arguments
Ruslan Ermilov <ru@nginx.com>
parents:
4283
diff
changeset
|
138 |
d3000365ac65
Changed ngx_log_debugN() macros to verify the number of arguments
Ruslan Ermilov <ru@nginx.com>
parents:
4283
diff
changeset
|
139 #define ngx_log_debug4(level, log, err, fmt, arg1, arg2, arg3, arg4) \ |
d3000365ac65
Changed ngx_log_debugN() macros to verify the number of arguments
Ruslan Ermilov <ru@nginx.com>
parents:
4283
diff
changeset
|
140 ngx_log_debug(level, log, err, fmt, arg1, arg2, arg3, arg4) |
d3000365ac65
Changed ngx_log_debugN() macros to verify the number of arguments
Ruslan Ermilov <ru@nginx.com>
parents:
4283
diff
changeset
|
141 |
d3000365ac65
Changed ngx_log_debugN() macros to verify the number of arguments
Ruslan Ermilov <ru@nginx.com>
parents:
4283
diff
changeset
|
142 #define ngx_log_debug5(level, log, err, fmt, arg1, arg2, arg3, arg4, arg5) \ |
d3000365ac65
Changed ngx_log_debugN() macros to verify the number of arguments
Ruslan Ermilov <ru@nginx.com>
parents:
4283
diff
changeset
|
143 ngx_log_debug(level, log, err, fmt, arg1, arg2, arg3, arg4, arg5) |
d3000365ac65
Changed ngx_log_debugN() macros to verify the number of arguments
Ruslan Ermilov <ru@nginx.com>
parents:
4283
diff
changeset
|
144 |
d3000365ac65
Changed ngx_log_debugN() macros to verify the number of arguments
Ruslan Ermilov <ru@nginx.com>
parents:
4283
diff
changeset
|
145 #define ngx_log_debug6(level, log, err, fmt, \ |
d3000365ac65
Changed ngx_log_debugN() macros to verify the number of arguments
Ruslan Ermilov <ru@nginx.com>
parents:
4283
diff
changeset
|
146 arg1, arg2, arg3, arg4, arg5, arg6) \ |
d3000365ac65
Changed ngx_log_debugN() macros to verify the number of arguments
Ruslan Ermilov <ru@nginx.com>
parents:
4283
diff
changeset
|
147 ngx_log_debug(level, log, err, fmt, \ |
d3000365ac65
Changed ngx_log_debugN() macros to verify the number of arguments
Ruslan Ermilov <ru@nginx.com>
parents:
4283
diff
changeset
|
148 arg1, arg2, arg3, arg4, arg5, arg6) |
d3000365ac65
Changed ngx_log_debugN() macros to verify the number of arguments
Ruslan Ermilov <ru@nginx.com>
parents:
4283
diff
changeset
|
149 |
d3000365ac65
Changed ngx_log_debugN() macros to verify the number of arguments
Ruslan Ermilov <ru@nginx.com>
parents:
4283
diff
changeset
|
150 #define ngx_log_debug7(level, log, err, fmt, \ |
d3000365ac65
Changed ngx_log_debugN() macros to verify the number of arguments
Ruslan Ermilov <ru@nginx.com>
parents:
4283
diff
changeset
|
151 arg1, arg2, arg3, arg4, arg5, arg6, arg7) \ |
d3000365ac65
Changed ngx_log_debugN() macros to verify the number of arguments
Ruslan Ermilov <ru@nginx.com>
parents:
4283
diff
changeset
|
152 ngx_log_debug(level, log, err, fmt, \ |
d3000365ac65
Changed ngx_log_debugN() macros to verify the number of arguments
Ruslan Ermilov <ru@nginx.com>
parents:
4283
diff
changeset
|
153 arg1, arg2, arg3, arg4, arg5, arg6, arg7) |
d3000365ac65
Changed ngx_log_debugN() macros to verify the number of arguments
Ruslan Ermilov <ru@nginx.com>
parents:
4283
diff
changeset
|
154 |
d3000365ac65
Changed ngx_log_debugN() macros to verify the number of arguments
Ruslan Ermilov <ru@nginx.com>
parents:
4283
diff
changeset
|
155 #define ngx_log_debug8(level, log, err, fmt, \ |
d3000365ac65
Changed ngx_log_debugN() macros to verify the number of arguments
Ruslan Ermilov <ru@nginx.com>
parents:
4283
diff
changeset
|
156 arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) \ |
d3000365ac65
Changed ngx_log_debugN() macros to verify the number of arguments
Ruslan Ermilov <ru@nginx.com>
parents:
4283
diff
changeset
|
157 ngx_log_debug(level, log, err, fmt, \ |
d3000365ac65
Changed ngx_log_debugN() macros to verify the number of arguments
Ruslan Ermilov <ru@nginx.com>
parents:
4283
diff
changeset
|
158 arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) |
389
537de4dca8ca
nginx-0.0.7-2004-07-13-21:59:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
379
diff
changeset
|
159 |
515 | 160 |
201
267ea1d98683
nginx-0.0.1-2003-11-30-23:03:18 import
Igor Sysoev <igor@sysoev.ru>
parents:
191
diff
changeset
|
161 #else /* NO VARIADIC MACROS */ |
267ea1d98683
nginx-0.0.1-2003-11-30-23:03:18 import
Igor Sysoev <igor@sysoev.ru>
parents:
191
diff
changeset
|
162 |
483 | 163 #define ngx_log_debug0(level, log, err, fmt) \ |
543 | 164 if ((log)->log_level & level) \ |
201
267ea1d98683
nginx-0.0.1-2003-11-30-23:03:18 import
Igor Sysoev <igor@sysoev.ru>
parents:
191
diff
changeset
|
165 ngx_log_debug_core(log, err, fmt) |
267ea1d98683
nginx-0.0.1-2003-11-30-23:03:18 import
Igor Sysoev <igor@sysoev.ru>
parents:
191
diff
changeset
|
166 |
483 | 167 #define ngx_log_debug1(level, log, err, fmt, arg1) \ |
543 | 168 if ((log)->log_level & level) \ |
201
267ea1d98683
nginx-0.0.1-2003-11-30-23:03:18 import
Igor Sysoev <igor@sysoev.ru>
parents:
191
diff
changeset
|
169 ngx_log_debug_core(log, err, fmt, arg1) |
210
00cafae0bdf1
nginx-0.0.1-2003-12-14-23:10:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
208
diff
changeset
|
170 |
483 | 171 #define ngx_log_debug2(level, log, err, fmt, arg1, arg2) \ |
543 | 172 if ((log)->log_level & level) \ |
210
00cafae0bdf1
nginx-0.0.1-2003-12-14-23:10:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
208
diff
changeset
|
173 ngx_log_debug_core(log, err, fmt, arg1, arg2) |
00cafae0bdf1
nginx-0.0.1-2003-12-14-23:10:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
208
diff
changeset
|
174 |
483 | 175 #define ngx_log_debug3(level, log, err, fmt, arg1, arg2, arg3) \ |
543 | 176 if ((log)->log_level & level) \ |
213
f536f91e8e99
nginx-0.0.1-2003-12-19-15:45:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
210
diff
changeset
|
177 ngx_log_debug_core(log, err, fmt, arg1, arg2, arg3) |
f536f91e8e99
nginx-0.0.1-2003-12-19-15:45:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
210
diff
changeset
|
178 |
483 | 179 #define ngx_log_debug4(level, log, err, fmt, arg1, arg2, arg3, arg4) \ |
543 | 180 if ((log)->log_level & level) \ |
214
e0c502f15852
nginx-0.0.1-2003-12-22-12:40:48 import
Igor Sysoev <igor@sysoev.ru>
parents:
213
diff
changeset
|
181 ngx_log_debug_core(log, err, fmt, arg1, arg2, arg3, arg4) |
e0c502f15852
nginx-0.0.1-2003-12-22-12:40:48 import
Igor Sysoev <igor@sysoev.ru>
parents:
213
diff
changeset
|
182 |
483 | 183 #define ngx_log_debug5(level, log, err, fmt, arg1, arg2, arg3, arg4, arg5) \ |
543 | 184 if ((log)->log_level & level) \ |
214
e0c502f15852
nginx-0.0.1-2003-12-22-12:40:48 import
Igor Sysoev <igor@sysoev.ru>
parents:
213
diff
changeset
|
185 ngx_log_debug_core(log, err, fmt, arg1, arg2, arg3, arg4, arg5) |
e0c502f15852
nginx-0.0.1-2003-12-22-12:40:48 import
Igor Sysoev <igor@sysoev.ru>
parents:
213
diff
changeset
|
186 |
483 | 187 #define ngx_log_debug6(level, log, err, fmt, \ |
188 arg1, arg2, arg3, arg4, arg5, arg6) \ | |
543 | 189 if ((log)->log_level & level) \ |
210
00cafae0bdf1
nginx-0.0.1-2003-12-14-23:10:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
208
diff
changeset
|
190 ngx_log_debug_core(log, err, fmt, arg1, arg2, arg3, arg4, arg5, arg6) |
00cafae0bdf1
nginx-0.0.1-2003-12-14-23:10:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
208
diff
changeset
|
191 |
483 | 192 #define ngx_log_debug7(level, log, err, fmt, \ |
193 arg1, arg2, arg3, arg4, arg5, arg6, arg7) \ | |
543 | 194 if ((log)->log_level & level) \ |
483 | 195 ngx_log_debug_core(log, err, fmt, \ |
389
537de4dca8ca
nginx-0.0.7-2004-07-13-21:59:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
379
diff
changeset
|
196 arg1, arg2, arg3, arg4, arg5, arg6, arg7) |
537de4dca8ca
nginx-0.0.7-2004-07-13-21:59:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
379
diff
changeset
|
197 |
483 | 198 #define ngx_log_debug8(level, log, err, fmt, \ |
199 arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) \ | |
543 | 200 if ((log)->log_level & level) \ |
483 | 201 ngx_log_debug_core(log, err, fmt, \ |
202 arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) | |
203 | |
201
267ea1d98683
nginx-0.0.1-2003-11-30-23:03:18 import
Igor Sysoev <igor@sysoev.ru>
parents:
191
diff
changeset
|
204 #endif |
267ea1d98683
nginx-0.0.1-2003-11-30-23:03:18 import
Igor Sysoev <igor@sysoev.ru>
parents:
191
diff
changeset
|
205 |
277
e91499541410
nginx-0.0.2-2004-03-03-19:14:15 import
Igor Sysoev <igor@sysoev.ru>
parents:
257
diff
changeset
|
206 #else /* NO NGX_DEBUG */ |
e91499541410
nginx-0.0.2-2004-03-03-19:14:15 import
Igor Sysoev <igor@sysoev.ru>
parents:
257
diff
changeset
|
207 |
e91499541410
nginx-0.0.2-2004-03-03-19:14:15 import
Igor Sysoev <igor@sysoev.ru>
parents:
257
diff
changeset
|
208 #define ngx_log_debug0(level, log, err, fmt) |
e91499541410
nginx-0.0.2-2004-03-03-19:14:15 import
Igor Sysoev <igor@sysoev.ru>
parents:
257
diff
changeset
|
209 #define ngx_log_debug1(level, log, err, fmt, arg1) |
e91499541410
nginx-0.0.2-2004-03-03-19:14:15 import
Igor Sysoev <igor@sysoev.ru>
parents:
257
diff
changeset
|
210 #define ngx_log_debug2(level, log, err, fmt, arg1, arg2) |
e91499541410
nginx-0.0.2-2004-03-03-19:14:15 import
Igor Sysoev <igor@sysoev.ru>
parents:
257
diff
changeset
|
211 #define ngx_log_debug3(level, log, err, fmt, arg1, arg2, arg3) |
e91499541410
nginx-0.0.2-2004-03-03-19:14:15 import
Igor Sysoev <igor@sysoev.ru>
parents:
257
diff
changeset
|
212 #define ngx_log_debug4(level, log, err, fmt, arg1, arg2, arg3, arg4) |
e91499541410
nginx-0.0.2-2004-03-03-19:14:15 import
Igor Sysoev <igor@sysoev.ru>
parents:
257
diff
changeset
|
213 #define ngx_log_debug5(level, log, err, fmt, arg1, arg2, arg3, arg4, arg5) |
e91499541410
nginx-0.0.2-2004-03-03-19:14:15 import
Igor Sysoev <igor@sysoev.ru>
parents:
257
diff
changeset
|
214 #define ngx_log_debug6(level, log, err, fmt, arg1, arg2, arg3, arg4, arg5, arg6) |
426
3f88935a02e8
nginx-0.0.10-2004-09-14-23:39:54 import
Igor Sysoev <igor@sysoev.ru>
parents:
417
diff
changeset
|
215 #define ngx_log_debug7(level, log, err, fmt, arg1, arg2, arg3, arg4, arg5, \ |
3f88935a02e8
nginx-0.0.10-2004-09-14-23:39:54 import
Igor Sysoev <igor@sysoev.ru>
parents:
417
diff
changeset
|
216 arg6, arg7) |
483 | 217 #define ngx_log_debug8(level, log, err, fmt, arg1, arg2, arg3, arg4, arg5, \ |
218 arg6, arg7, arg8) | |
277
e91499541410
nginx-0.0.2-2004-03-03-19:14:15 import
Igor Sysoev <igor@sysoev.ru>
parents:
257
diff
changeset
|
219 |
e91499541410
nginx-0.0.2-2004-03-03-19:14:15 import
Igor Sysoev <igor@sysoev.ru>
parents:
257
diff
changeset
|
220 #endif |
201
267ea1d98683
nginx-0.0.1-2003-11-30-23:03:18 import
Igor Sysoev <igor@sysoev.ru>
parents:
191
diff
changeset
|
221 |
267ea1d98683
nginx-0.0.1-2003-11-30-23:03:18 import
Igor Sysoev <igor@sysoev.ru>
parents:
191
diff
changeset
|
222 /*********************************/ |
267ea1d98683
nginx-0.0.1-2003-11-30-23:03:18 import
Igor Sysoev <igor@sysoev.ru>
parents:
191
diff
changeset
|
223 |
2758 | 224 ngx_log_t *ngx_log_init(u_char *prefix); |
2752
2d82d3cfbfa0
change ngx_log_abort() interface
Igor Sysoev <igor@sysoev.ru>
parents:
2749
diff
changeset
|
225 void ngx_cdecl ngx_log_abort(ngx_err_t err, const char *fmt, ...); |
2743
d8316f307b6a
issue start up errors and warning on both stderr and error_log
Igor Sysoev <igor@sysoev.ru>
parents:
2722
diff
changeset
|
226 void ngx_cdecl ngx_log_stderr(ngx_err_t err, const char *fmt, ...); |
2765 | 227 u_char *ngx_log_errno(u_char *buf, u_char *last, ngx_err_t err); |
5260
e088695737c3
Core: consolidated log-related code.
Vladimir Homutov <vl@nginx.com>
parents:
5254
diff
changeset
|
228 ngx_int_t ngx_log_open_default(ngx_cycle_t *cycle); |
e088695737c3
Core: consolidated log-related code.
Vladimir Homutov <vl@nginx.com>
parents:
5254
diff
changeset
|
229 ngx_int_t ngx_log_redirect_stderr(ngx_cycle_t *cycle); |
5254
7ecaa9e4bf1b
Core: support several "error_log" directives.
Vladimir Homutov <vl@nginx.com>
parents:
4412
diff
changeset
|
230 char *ngx_log_set_log(ngx_conf_t *cf, ngx_log_t **head); |
234
cd71b95716b4
nginx-0.0.1-2004-01-20-23:40:08 import
Igor Sysoev <igor@sysoev.ru>
parents:
218
diff
changeset
|
231 |
109
a9bc21d63fe4
nginx-0.0.1-2003-07-02-18:41:17 import
Igor Sysoev <igor@sysoev.ru>
parents:
106
diff
changeset
|
232 |
4283
f72496073689
Introduction of simple ngx_write_stderr() instead of ngx_log_stderr()
Igor Sysoev <igor@sysoev.ru>
parents:
3673
diff
changeset
|
233 /* |
f72496073689
Introduction of simple ngx_write_stderr() instead of ngx_log_stderr()
Igor Sysoev <igor@sysoev.ru>
parents:
3673
diff
changeset
|
234 * ngx_write_stderr() cannot be implemented as macro, since |
f72496073689
Introduction of simple ngx_write_stderr() instead of ngx_log_stderr()
Igor Sysoev <igor@sysoev.ru>
parents:
3673
diff
changeset
|
235 * MSVC does not allow to use #ifdef inside macro parameters. |
f72496073689
Introduction of simple ngx_write_stderr() instead of ngx_log_stderr()
Igor Sysoev <igor@sysoev.ru>
parents:
3673
diff
changeset
|
236 * |
f72496073689
Introduction of simple ngx_write_stderr() instead of ngx_log_stderr()
Igor Sysoev <igor@sysoev.ru>
parents:
3673
diff
changeset
|
237 * ngx_write_fd() is used instead of ngx_write_console(), since |
f72496073689
Introduction of simple ngx_write_stderr() instead of ngx_log_stderr()
Igor Sysoev <igor@sysoev.ru>
parents:
3673
diff
changeset
|
238 * CharToOemBuff() inside ngx_write_console() cannot be used with |
f72496073689
Introduction of simple ngx_write_stderr() instead of ngx_log_stderr()
Igor Sysoev <igor@sysoev.ru>
parents:
3673
diff
changeset
|
239 * read only buffer as destination and CharToOemBuff() is not needed |
f72496073689
Introduction of simple ngx_write_stderr() instead of ngx_log_stderr()
Igor Sysoev <igor@sysoev.ru>
parents:
3673
diff
changeset
|
240 * for ngx_write_stderr() anyway. |
f72496073689
Introduction of simple ngx_write_stderr() instead of ngx_log_stderr()
Igor Sysoev <igor@sysoev.ru>
parents:
3673
diff
changeset
|
241 */ |
f72496073689
Introduction of simple ngx_write_stderr() instead of ngx_log_stderr()
Igor Sysoev <igor@sysoev.ru>
parents:
3673
diff
changeset
|
242 static ngx_inline void |
f72496073689
Introduction of simple ngx_write_stderr() instead of ngx_log_stderr()
Igor Sysoev <igor@sysoev.ru>
parents:
3673
diff
changeset
|
243 ngx_write_stderr(char *text) |
f72496073689
Introduction of simple ngx_write_stderr() instead of ngx_log_stderr()
Igor Sysoev <igor@sysoev.ru>
parents:
3673
diff
changeset
|
244 { |
f72496073689
Introduction of simple ngx_write_stderr() instead of ngx_log_stderr()
Igor Sysoev <igor@sysoev.ru>
parents:
3673
diff
changeset
|
245 (void) ngx_write_fd(ngx_stderr, text, strlen(text)); |
f72496073689
Introduction of simple ngx_write_stderr() instead of ngx_log_stderr()
Igor Sysoev <igor@sysoev.ru>
parents:
3673
diff
changeset
|
246 } |
f72496073689
Introduction of simple ngx_write_stderr() instead of ngx_log_stderr()
Igor Sysoev <igor@sysoev.ru>
parents:
3673
diff
changeset
|
247 |
f72496073689
Introduction of simple ngx_write_stderr() instead of ngx_log_stderr()
Igor Sysoev <igor@sysoev.ru>
parents:
3673
diff
changeset
|
248 |
100
7ebc8b7fb816
nginx-0.0.1-2003-06-03-19:42:58 import
Igor Sysoev <igor@sysoev.ru>
parents:
92
diff
changeset
|
249 extern ngx_module_t ngx_errlog_module; |
2743
d8316f307b6a
issue start up errors and warning on both stderr and error_log
Igor Sysoev <igor@sysoev.ru>
parents:
2722
diff
changeset
|
250 extern ngx_uint_t ngx_use_stderr; |
100
7ebc8b7fb816
nginx-0.0.1-2003-06-03-19:42:58 import
Igor Sysoev <igor@sysoev.ru>
parents:
92
diff
changeset
|
251 |
7ebc8b7fb816
nginx-0.0.1-2003-06-03-19:42:58 import
Igor Sysoev <igor@sysoev.ru>
parents:
92
diff
changeset
|
252 |
0
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
253 #endif /* _NGX_LOG_H_INCLUDED_ */ |