comparison src/core/ngx_log.h @ 5254:7ecaa9e4bf1b

Core: support several "error_log" directives. When several "error_log" directives are specified in the same configuration block, logs are written to all files with a matching log level. All logs are stored in the singly-linked list that is sorted by log level in the descending order. Specific debug levels (NGX_LOG_DEBUG_HTTP,EVENT, etc.) are not supported if several "error_log" directives are specified. In this case all logs will use debug level that has largest absolute value.
author Vladimir Homutov <vl@nginx.com>
date Thu, 20 Jun 2013 20:47:39 +0400
parents d620f497c50f
children e088695737c3
comparison
equal deleted inserted replaced
5253:a82f305487c2 5254:7ecaa9e4bf1b
59 * the static strings and in the "u_char *" case we have to override 59 * the static strings and in the "u_char *" case we have to override
60 * their types all the time 60 * their types all the time
61 */ 61 */
62 62
63 char *action; 63 char *action;
64
65 ngx_log_t *next;
64 }; 66 };
65 67
66 68
67 #define NGX_MAX_ERROR_STR 2048 69 #define NGX_MAX_ERROR_STR 2048
68 70
218 #endif 220 #endif
219 221
220 /*********************************/ 222 /*********************************/
221 223
222 ngx_log_t *ngx_log_init(u_char *prefix); 224 ngx_log_t *ngx_log_init(u_char *prefix);
223 ngx_log_t *ngx_log_create(ngx_cycle_t *cycle, ngx_str_t *name);
224 char *ngx_log_set_levels(ngx_conf_t *cf, ngx_log_t *log);
225 void ngx_cdecl ngx_log_abort(ngx_err_t err, const char *fmt, ...); 225 void ngx_cdecl ngx_log_abort(ngx_err_t err, const char *fmt, ...);
226 void ngx_cdecl ngx_log_stderr(ngx_err_t err, const char *fmt, ...); 226 void ngx_cdecl ngx_log_stderr(ngx_err_t err, const char *fmt, ...);
227 u_char *ngx_log_errno(u_char *buf, u_char *last, ngx_err_t err); 227 u_char *ngx_log_errno(u_char *buf, u_char *last, ngx_err_t err);
228 char *ngx_log_set_log(ngx_conf_t *cf, ngx_log_t **head);
228 229
229 230
230 /* 231 /*
231 * ngx_write_stderr() cannot be implemented as macro, since 232 * ngx_write_stderr() cannot be implemented as macro, since
232 * MSVC does not allow to use #ifdef inside macro parameters. 233 * MSVC does not allow to use #ifdef inside macro parameters.