aboutsummaryrefslogtreecommitdiff
path: root/src/core/nginx.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2010-09-02 13:43:02 +0000
committerIgor Sysoev <igor@sysoev.ru>2010-09-02 13:43:02 +0000
commit2cb30f153f8266d31661a7170ea838aae619447e (patch)
tree3ba02c0e50dee71ca9ac0eb1242641a7e19d5cb3 /src/core/nginx.c
parentf7dd767e57563b77ecc2c4c4c2fcb7f4973375d1 (diff)
downloadnginx-2cb30f153f8266d31661a7170ea838aae619447e.tar.gz
nginx-2cb30f153f8266d31661a7170ea838aae619447e.zip
the -q switch
Diffstat (limited to 'src/core/nginx.c')
-rw-r--r--src/core/nginx.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/core/nginx.c b/src/core/nginx.c
index 80a5d18ae..62cea7557 100644
--- a/src/core/nginx.c
+++ b/src/core/nginx.c
@@ -212,7 +212,7 @@ main(int argc, char *const *argv)
if (ngx_show_help) {
ngx_log_stderr(0,
- "Usage: nginx [-?hvVt] [-s signal] [-c filename] "
+ "Usage: nginx [-?hvVtq] [-s signal] [-c filename] "
"[-p prefix] [-g directives]" CRLF CRLF
"Options:" CRLF
" -?,-h : this help" CRLF
@@ -220,6 +220,8 @@ main(int argc, char *const *argv)
" -V : show version and configure options then exit"
CRLF
" -t : test configuration and exit" CRLF
+ " -q : suppress non-error messages "
+ "during configuration testing" CRLF
" -s signal : send signal to a master process: "
"stop, quit, reopen, reload" CRLF
#ifdef NGX_PREFIX
@@ -332,8 +334,11 @@ main(int argc, char *const *argv)
}
if (ngx_test_config) {
- ngx_log_stderr(0, "configuration file %s test is successful",
- cycle->conf_file.data);
+ if (!ngx_quiet_mode) {
+ ngx_log_stderr(0, "configuration file %s test is successful",
+ cycle->conf_file.data);
+ }
+
return 0;
}
@@ -685,6 +690,10 @@ ngx_get_options(int argc, char *const *argv)
ngx_test_config = 1;
break;
+ case 'q':
+ ngx_quiet_mode = 1;
+ break;
+
case 'p':
if (*p) {
ngx_prefix = p;