diff options
| author | Ruslan Ermilov <ru@nginx.com> | 2012-03-15 20:04:50 +0000 |
|---|---|---|
| committer | Ruslan Ermilov <ru@nginx.com> | 2012-03-15 20:04:50 +0000 |
| commit | 849e3b09ae74bcf2b443b3c2eaf851609fd0f763 (patch) | |
| tree | e45b03a8a9fd6f52499b87374e272948251f081b | |
| parent | 091f6ffce64b0b8f36480c80046a5e961ebfce29 (diff) | |
| download | nginx-849e3b09ae74bcf2b443b3c2eaf851609fd0f763.tar.gz nginx-849e3b09ae74bcf2b443b3c2eaf851609fd0f763.tar.bz2 | |
The "error_log" directive specified in the "http", "server", and
"location" sections now understands the special "stderr" parameter.
It was already treated specially when specified in the main section.
| -rw-r--r-- | src/http/ngx_http_core_module.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c index 7504a2c64..6dcc38be8 100644 --- a/src/http/ngx_http_core_module.c +++ b/src/http/ngx_http_core_module.c @@ -4647,7 +4647,7 @@ ngx_http_core_error_log(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) { ngx_http_core_loc_conf_t *clcf = conf; - ngx_str_t *value; + ngx_str_t *value, name; if (clcf->error_log) { return "is duplicate"; @@ -4655,7 +4655,14 @@ ngx_http_core_error_log(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) value = cf->args->elts; - clcf->error_log = ngx_log_create(cf->cycle, &value[1]); + if (ngx_strcmp(value[1].data, "stderr") == 0) { + ngx_str_null(&name); + + } else { + name = value[1]; + } + + clcf->error_log = ngx_log_create(cf->cycle, &name); if (clcf->error_log == NULL) { return NGX_CONF_ERROR; } |
