Mercurial > hg > nginx
changeset 2749:ccaf43725ff6
change ngx_log_create_errlog() interface
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Fri, 24 Apr 2009 14:27:36 +0000 |
parents | 2477b28eaccb |
children | 9a5f7b81b937 |
files | src/core/ngx_log.c src/core/ngx_log.h src/http/ngx_http_core_module.c |
diffstat | 3 files changed, 7 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/src/core/ngx_log.c Fri Apr 24 09:54:40 2009 +0000 +++ b/src/core/ngx_log.c Fri Apr 24 14:27:36 2009 +0000 @@ -303,18 +303,9 @@ ngx_log_t * -ngx_log_create_errlog(ngx_cycle_t *cycle, ngx_array_t *args) +ngx_log_create_errlog(ngx_cycle_t *cycle, ngx_str_t *name) { ngx_log_t *log; - ngx_str_t *value, *name; - - if (args) { - value = args->elts; - name = &value[1]; - - } else { - name = NULL; - } log = ngx_pcalloc(cycle->pool, sizeof(ngx_log_t)); if (log == NULL) {
--- a/src/core/ngx_log.h Fri Apr 24 09:54:40 2009 +0000 +++ b/src/core/ngx_log.h Fri Apr 24 14:27:36 2009 +0000 @@ -196,7 +196,7 @@ /*********************************/ ngx_log_t *ngx_log_init(void); -ngx_log_t *ngx_log_create_errlog(ngx_cycle_t *cycle, ngx_array_t *args); +ngx_log_t *ngx_log_create_errlog(ngx_cycle_t *cycle, ngx_str_t *name); char *ngx_set_error_log_levels(ngx_conf_t *cf, ngx_log_t *log); void ngx_log_abort(ngx_err_t err, const char *text, void *param); void ngx_cdecl ngx_log_stderr(ngx_err_t err, const char *fmt, ...);
--- a/src/http/ngx_http_core_module.c Fri Apr 24 09:54:40 2009 +0000 +++ b/src/http/ngx_http_core_module.c Fri Apr 24 14:27:36 2009 +0000 @@ -4101,7 +4101,11 @@ { ngx_http_core_loc_conf_t *lcf = conf; - lcf->err_log = ngx_log_create_errlog(cf->cycle, cf->args); + ngx_str_t *value; + + value = cf->args->elts; + + lcf->err_log = ngx_log_create_errlog(cf->cycle, &value[1]); if (lcf->err_log == NULL) { return NGX_CONF_ERROR; }