From 03420a621ae7f0b7ca37d37b33ff9ae8277dda49 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Tue, 20 Jan 2004 20:40:08 +0000 Subject: nginx-0.0.1-2004-01-20-23:40:08 import --- src/http/ngx_http_core_module.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'src/http/ngx_http_core_module.c') diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c index 46c90f8da..53be3848f 100644 --- a/src/http/ngx_http_core_module.c +++ b/src/http/ngx_http_core_module.c @@ -205,7 +205,7 @@ static ngx_command_t ngx_http_core_commands[] = { NULL }, { ngx_string("error_log"), - NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1, + NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_1MORE, ngx_set_error_log, NGX_HTTP_LOC_CONF_OFFSET, 0, @@ -1395,17 +1395,11 @@ static char *ngx_set_error_log(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) { ngx_http_core_loc_conf_t *lcf = conf; -#if 0 - ngx_str_t *value; - - value = cf->args->elts; -#endif - - ngx_test_null(lcf->err_log, - ngx_log_create_errlog(cf->cycle, cf->args), - NGX_CONF_ERROR); + if (!(lcf->err_log = ngx_log_create_errlog(cf->cycle, cf->args))) { + return NGX_CONF_ERROR; + } - return NGX_CONF_OK; + return ngx_set_error_log_levels(cf, lcf->err_log); } -- cgit