Skip to content

Commit 8b6dc6c

Browse files
committed
Use "%o" in path debug to tell types apart
1 parent 081b811 commit 8b6dc6c

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

History.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ unreleased
55
* Remove usage of `res._headers` private field
66
- Improves compatibility with Node.js 8 nightly
77
* Skip routing when `req.url` is not set
8+
* Use `%o` in path debug to tell types apart
89
* Use `Object.create` to setup request & response prototypes
910
* Use `setprototypeof` module to replace `__proto__` setting
1011
* Use `statuses` instead of `http` module for status messages

lib/router/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ proto.use = function use(fn) {
452452
}
453453

454454
// add the middleware
455-
debug('use %s %s', path, fn.name || '<anonymous>');
455+
debug('use %o %s', path, fn.name || '<anonymous>')
456456

457457
var layer = new Layer(path, {
458458
sensitive: this.caseSensitive,

lib/router/layer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ function Layer(path, options, fn) {
3535
return new Layer(path, options, fn);
3636
}
3737

38-
debug('new %s', path);
38+
debug('new %o', path)
3939
var opts = options || {};
4040

4141
this.handle = fn;

lib/router/route.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ function Route(path) {
4444
this.path = path;
4545
this.stack = [];
4646

47-
debug('new %s', path);
47+
debug('new %o', path)
4848

4949
// route handlers for various http methods
5050
this.methods = {};
@@ -196,7 +196,7 @@ methods.forEach(function(method){
196196
throw new Error(msg);
197197
}
198198

199-
debug('%s %s', method, this.path);
199+
debug('%s %o', method, this.path)
200200

201201
var layer = Layer('/', {}, handle);
202202
layer.method = method;

0 commit comments

Comments
 (0)