aboutsummaryrefslogtreecommitdiff
path: root/src/core/nginx.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/nginx.c')
-rw-r--r--src/core/nginx.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/core/nginx.c b/src/core/nginx.c
index 796717ab9..4cc80826e 100644
--- a/src/core/nginx.c
+++ b/src/core/nginx.c
@@ -387,13 +387,8 @@ main(int argc, char *const *argv)
return 1;
}
- if (!cycle->log_use_stderr && cycle->log->file->fd != ngx_stderr) {
-
- if (ngx_set_stderr(cycle->log->file->fd) == NGX_FILE_ERROR) {
- ngx_log_error(NGX_LOG_EMERG, cycle->log, ngx_errno,
- ngx_set_stderr_n " failed");
- return 1;
- }
+ if (ngx_log_redirect_stderr(cycle) != NGX_OK) {
+ return 1;
}
if (log->file->fd != ngx_stderr) {