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.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/core/nginx.c b/src/core/nginx.c
index 0f37f2ad8..a41c55cea 100644
--- a/src/core/nginx.c
+++ b/src/core/nginx.c
@@ -118,7 +118,7 @@ int main(int argc, char *const *argv)
ngx_pid = ngx_getpid();
- if (!(log = ngx_log_init_errlog())) {
+ if (!(log = ngx_log_init_stderr())) {
return 1;
}
@@ -144,6 +144,14 @@ int main(int argc, char *const *argv)
return 1;
}
+ if (ngx_test_config) {
+ log->log_level = NGX_LOG_INFO;
+ } else {
+ if (ngx_log_init_error_log() == NGX_ERROR) {
+ return 1;
+ }
+ }
+
if (ngx_os_init(log) == NGX_ERROR) {
return 1;
}