diff src/core/ngx_log.c @ 5240:d8af1005e886

Core: fixed handling of "stderr" in error_log. If "stderr" was specified in one of the "error_log" directives, stderr is not redirected to the first error_log on startup, configuration reload, and reopening log files.
author Vladimir Homutov <vl@nginx.com>
date Tue, 04 Jun 2013 11:27:36 +0400
parents d620f497c50f
children 3bb51e5afa9e
line wrap: on
line diff
--- a/src/core/ngx_log.c
+++ b/src/core/ngx_log.c
@@ -438,6 +438,7 @@ ngx_error_log(ngx_conf_t *cf, ngx_comman
 
     if (ngx_strcmp(value[1].data, "stderr") == 0) {
         ngx_str_null(&name);
+        cf->cycle->log_use_stderr = 1;
 
     } else {
         name = value[1];