Mercurial > hg > nginx
diff src/core/ngx_cycle.c @ 316:a0beefedaf94
nginx-0.0.3-2004-04-15-00:34:05 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Wed, 14 Apr 2004 20:34:05 +0000 |
parents | 11ff50a35d6d |
children | 1308b98496a2 |
line wrap: on
line diff
--- a/src/core/ngx_cycle.c Wed Apr 14 17:44:28 2004 +0000 +++ b/src/core/ngx_cycle.c Wed Apr 14 20:34:05 2004 +0000 @@ -23,7 +23,7 @@ { void *rv; ngx_uint_t i, n, failed; - ngx_log_t *log; + ngx_log_t *log, *new_log; ngx_conf_t conf; ngx_pool_t *pool; ngx_cycle_t *cycle, **old; @@ -44,6 +44,9 @@ } cycle->pool = pool; + pool->log = log; + cycle->log = log; + cycle->old_cycle = old_cycle; cycle->conf_file = old_cycle->conf_file; @@ -71,7 +74,7 @@ cycle->open_files.pool = pool; - if (!(cycle->log = ngx_log_create_errlog(cycle, NULL))) { + if (!(new_log = ngx_log_create_errlog(cycle, NULL))) { ngx_destroy_pool(pool); return NULL; } @@ -129,12 +132,14 @@ conf.module_type = NGX_CORE_MODULE; conf.cmd_type = NGX_MAIN_CONF; + cycle->log = new_log; if (ngx_conf_parse(&conf, &cycle->conf_file) != NGX_CONF_OK) { ngx_destroy_pool(pool); return NULL; } + cycle->log = log; for (i = 0; ngx_modules[i]; i++) { if (ngx_modules[i]->type != NGX_CORE_MODULE) { @@ -203,6 +208,8 @@ } } + cycle->log = new_log; + pool->log = new_log; if (!failed) { if (old_cycle->listening.nelts) {