mirror of
https://github.com/nginx/nginx.git
synced 2025-08-06 06:46:16 +08:00
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.
This commit is contained in:
parent
091f6ffce6
commit
849e3b09ae
@ -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_http_core_loc_conf_t *clcf = conf;
|
||||||
|
|
||||||
ngx_str_t *value;
|
ngx_str_t *value, name;
|
||||||
|
|
||||||
if (clcf->error_log) {
|
if (clcf->error_log) {
|
||||||
return "is duplicate";
|
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;
|
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) {
|
if (clcf->error_log == NULL) {
|
||||||
return NGX_CONF_ERROR;
|
return NGX_CONF_ERROR;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user