aboutsummaryrefslogtreecommitdiff
path: root/src/core/ngx_log.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/ngx_log.c')
-rw-r--r--src/core/ngx_log.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/ngx_log.c b/src/core/ngx_log.c
index 2f8276bb6..c3cec3862 100644
--- a/src/core/ngx_log.c
+++ b/src/core/ngx_log.c
@@ -240,13 +240,16 @@ ngx_log_t *ngx_log_init_errlog()
}
-ngx_log_t *ngx_log_create_errlog(ngx_cycle_t *cycle)
+ngx_log_t *ngx_log_create_errlog(ngx_cycle_t *cycle, ngx_str_t *name)
{
ngx_log_t *log;
ngx_test_null(log, ngx_pcalloc(cycle->pool, sizeof(ngx_log_t)), NULL);
ngx_test_null(log->file, ngx_push_array(&cycle->open_files), NULL);
log->file->fd = NGX_INVALID_FILE;
+ if (name) {
+ log->file->name = *name;
+ }
return log;
}