Mercurial > hg > nginx
comparison src/stream/ngx_stream_upstream.c @ 6699:9cf2dce316e5
Fixed log levels of configuration parsing errors.
All the errors that prevent loading configuration must be printed on the "emerg"
log level. Previously, nginx might silently fail to load configuration in some
cases as the default log level is "error".
author | Valentin Bartenev <vbart@nginx.com> |
---|---|
date | Tue, 20 Sep 2016 15:07:16 +0300 |
parents | c02290241cbe |
children | 29bf0dbc0a77 |
comparison
equal
deleted
inserted
replaced
6698:e8d4c9e9682a | 6699:9cf2dce316e5 |
---|---|
584 "duplicate upstream \"%V\"", &u->host); | 584 "duplicate upstream \"%V\"", &u->host); |
585 return NULL; | 585 return NULL; |
586 } | 586 } |
587 | 587 |
588 if ((uscfp[i]->flags & NGX_STREAM_UPSTREAM_CREATE) && !u->no_port) { | 588 if ((uscfp[i]->flags & NGX_STREAM_UPSTREAM_CREATE) && !u->no_port) { |
589 ngx_conf_log_error(NGX_LOG_WARN, cf, 0, | 589 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, |
590 "upstream \"%V\" may not have port %d", | 590 "upstream \"%V\" may not have port %d", |
591 &u->host, u->port); | 591 &u->host, u->port); |
592 return NULL; | 592 return NULL; |
593 } | 593 } |
594 | 594 |
595 if ((flags & NGX_STREAM_UPSTREAM_CREATE) && !uscfp[i]->no_port) { | 595 if ((flags & NGX_STREAM_UPSTREAM_CREATE) && !uscfp[i]->no_port) { |
596 ngx_log_error(NGX_LOG_WARN, cf->log, 0, | 596 ngx_log_error(NGX_LOG_EMERG, cf->log, 0, |
597 "upstream \"%V\" may not have port %d in %s:%ui", | 597 "upstream \"%V\" may not have port %d in %s:%ui", |
598 &u->host, uscfp[i]->port, | 598 &u->host, uscfp[i]->port, |
599 uscfp[i]->file_name, uscfp[i]->line); | 599 uscfp[i]->file_name, uscfp[i]->line); |
600 return NULL; | 600 return NULL; |
601 } | 601 } |