comparison src/core/ngx_conf_file.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 2cd019520210
children 1bf4f21b1b72
comparison
equal deleted inserted replaced
6698:e8d4c9e9682a 6699:9cf2dce316e5
1334 *np = e[i].value; 1334 *np = e[i].value;
1335 1335
1336 return NGX_CONF_OK; 1336 return NGX_CONF_OK;
1337 } 1337 }
1338 1338
1339 ngx_conf_log_error(NGX_LOG_WARN, cf, 0, 1339 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
1340 "invalid value \"%s\"", value[1].data); 1340 "invalid value \"%s\"", value[1].data);
1341 1341
1342 return NGX_CONF_ERROR; 1342 return NGX_CONF_ERROR;
1343 } 1343 }
1344 1344
1376 1376
1377 break; 1377 break;
1378 } 1378 }
1379 1379
1380 if (mask[m].name.len == 0) { 1380 if (mask[m].name.len == 0) {
1381 ngx_conf_log_error(NGX_LOG_WARN, cf, 0, 1381 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
1382 "invalid value \"%s\"", value[i].data); 1382 "invalid value \"%s\"", value[i].data);
1383 1383
1384 return NGX_CONF_ERROR; 1384 return NGX_CONF_ERROR;
1385 } 1385 }
1386 } 1386 }