Add settings to debug output

closes #2675
This commit is contained in:
Douglas Christopher Wilson 2015-06-20 16:21:12 -04:00
parent 9302acc5e4
commit 2a455890b9
2 changed files with 3 additions and 3 deletions

View File

@ -1,6 +1,7 @@
unreleased
==========
* Add settings to debug output
* Fix `res.format` error when only `default` provided
* Fix issue where `next('route')` in `app.param` would incorrectly skip values
* Fix hiding platform issues with `decodeURIComponent`

View File

@ -354,21 +354,20 @@ app.set = function set(setting, val) {
return this.settings[setting];
}
debug('set "%s" to %o', setting, val);
// set value
this.settings[setting] = val;
// trigger matched settings
switch (setting) {
case 'etag':
debug('compile etag %s', val);
this.set('etag fn', compileETag(val));
break;
case 'query parser':
debug('compile query parser %s', val);
this.set('query parser fn', compileQueryParser(val));
break;
case 'trust proxy':
debug('compile trust proxy %s', val);
this.set('trust proxy fn', compileTrust(val));
// trust proxy inherit back-compat