Skip to content
Myr

Use "%o" in path debug to tell types apart

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Douglas Christopher Wilson · committed by Douglas Christopher Wilson · parent 081b811 · Browse files · 4 files+5 added−4 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

4 files+5 added−4 removed

  • other:+5 added−4 removed

4 files+5 added−4 removed

modified:lib/router/index.js+1 added-1 removed
450 unmodified lines
451 throw new TypeError('Router.use() requires middleware function but got a ' + gettype(fn));452 }453454 // add the middleware455 debug('use %s %s', path, fn.name || '<anonymous>');455 debug('use %o %s', path, fn.name || '<anonymous>')456457 var layer = new Layer(path, {458 sensitive: this.caseSensitive,459 strict: false,
196 unmodified lines
modified:lib/router/layer.js+1 added-1 removed
modified:lib/router/route.js+2 added-2 removed
42 unmodified lines
43function Route(path) {44 this.path = path;45 this.stack = [];4647 debug('new %s', path);47 debug('new %o', path)4849 // route handlers for various http methods50 this.methods = {};51}
143 unmodified lines
195 var msg = 'Route.' + method + '() requires callback functions but got a ' + type;196 throw new Error(msg);197 }198199 debug('%s %s', method, this.path);199 debug('%s %o', method, this.path)200201 var layer = Layer('/', {}, handle);202 layer.method = method;203
7 unmodified lines
modified:History.md+1 added
3 unmodified lines
4 * Add debug message when loading view engine5 * Remove usage of `res._headers` private field6 - Improves compatibility with Node.js 8 nightly7 * Skip routing when `req.url` is not set8 * Use `%o` in path debug to tell types apart9 * Use `Object.create` to setup request & response prototypes10 * Use `setprototypeof` module to replace `__proto__` setting11 * Use `statuses` instead of `http` module for status messages12 * deps: debug@2.6.1
3218 unmodified lines