Mercurial > hg > nginx
comparison src/http/ngx_http_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 | c131f20c9562 |
children | edcd9303a4d3 |
comparison
equal
deleted
inserted
replaced
6698:e8d4c9e9682a | 6699:9cf2dce316e5 |
---|---|
5715 "duplicate upstream \"%V\"", &u->host); | 5715 "duplicate upstream \"%V\"", &u->host); |
5716 return NULL; | 5716 return NULL; |
5717 } | 5717 } |
5718 | 5718 |
5719 if ((uscfp[i]->flags & NGX_HTTP_UPSTREAM_CREATE) && !u->no_port) { | 5719 if ((uscfp[i]->flags & NGX_HTTP_UPSTREAM_CREATE) && !u->no_port) { |
5720 ngx_conf_log_error(NGX_LOG_WARN, cf, 0, | 5720 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, |
5721 "upstream \"%V\" may not have port %d", | 5721 "upstream \"%V\" may not have port %d", |
5722 &u->host, u->port); | 5722 &u->host, u->port); |
5723 return NULL; | 5723 return NULL; |
5724 } | 5724 } |
5725 | 5725 |
5726 if ((flags & NGX_HTTP_UPSTREAM_CREATE) && !uscfp[i]->no_port) { | 5726 if ((flags & NGX_HTTP_UPSTREAM_CREATE) && !uscfp[i]->no_port) { |
5727 ngx_log_error(NGX_LOG_WARN, cf->log, 0, | 5727 ngx_log_error(NGX_LOG_EMERG, cf->log, 0, |
5728 "upstream \"%V\" may not have port %d in %s:%ui", | 5728 "upstream \"%V\" may not have port %d in %s:%ui", |
5729 &u->host, uscfp[i]->port, | 5729 &u->host, uscfp[i]->port, |
5730 uscfp[i]->file_name, uscfp[i]->line); | 5730 uscfp[i]->file_name, uscfp[i]->line); |
5731 return NULL; | 5731 return NULL; |
5732 } | 5732 } |