comparison src/os/unix/ngx_process_cycle.c @ 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 711fa02afae8
children 8e7db77e5d88
comparison
equal deleted inserted replaced
5253:a82f305487c2 5254:7ecaa9e4bf1b
712 712
713 ngx_exit_log_file.fd = ngx_cycle->log->file->fd; 713 ngx_exit_log_file.fd = ngx_cycle->log->file->fd;
714 714
715 ngx_exit_log = *ngx_cycle->log; 715 ngx_exit_log = *ngx_cycle->log;
716 ngx_exit_log.file = &ngx_exit_log_file; 716 ngx_exit_log.file = &ngx_exit_log_file;
717 ngx_exit_log.next = NULL;
717 718
718 ngx_exit_cycle.log = &ngx_exit_log; 719 ngx_exit_cycle.log = &ngx_exit_log;
719 ngx_exit_cycle.files = ngx_cycle->files; 720 ngx_exit_cycle.files = ngx_cycle->files;
720 ngx_exit_cycle.files_n = ngx_cycle->files_n; 721 ngx_exit_cycle.files_n = ngx_cycle->files_n;
721 ngx_cycle = &ngx_exit_cycle; 722 ngx_cycle = &ngx_exit_cycle;
1064 1065
1065 ngx_exit_log_file.fd = ngx_cycle->log->file->fd; 1066 ngx_exit_log_file.fd = ngx_cycle->log->file->fd;
1066 1067
1067 ngx_exit_log = *ngx_cycle->log; 1068 ngx_exit_log = *ngx_cycle->log;
1068 ngx_exit_log.file = &ngx_exit_log_file; 1069 ngx_exit_log.file = &ngx_exit_log_file;
1070 ngx_exit_log.next = NULL;
1069 1071
1070 ngx_exit_cycle.log = &ngx_exit_log; 1072 ngx_exit_cycle.log = &ngx_exit_log;
1071 ngx_exit_cycle.files = ngx_cycle->files; 1073 ngx_exit_cycle.files = ngx_cycle->files;
1072 ngx_exit_cycle.files_n = ngx_cycle->files_n; 1074 ngx_exit_cycle.files_n = ngx_cycle->files_n;
1073 ngx_cycle = &ngx_exit_cycle; 1075 ngx_cycle = &ngx_exit_cycle;