Skip to content

Commit

Permalink
Use "%o" in path debug to tell types apart
Browse files Browse the repository at this point in the history
  • Loading branch information
dougwilson committed Feb 26, 2017
1 parent 081b811 commit 8b6dc6c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions History.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ unreleased
* Remove usage of `res._headers` private field
- Improves compatibility with Node.js 8 nightly
* Skip routing when `req.url` is not set
* Use `%o` in path debug to tell types apart
* Use `Object.create` to setup request & response prototypes
* Use `setprototypeof` module to replace `__proto__` setting
* Use `statuses` instead of `http` module for status messages
Expand Down
2 changes: 1 addition & 1 deletion lib/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ proto.use = function use(fn) {
}

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

var layer = new Layer(path, {
sensitive: this.caseSensitive,
Expand Down
2 changes: 1 addition & 1 deletion lib/router/layer.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function Layer(path, options, fn) {
return new Layer(path, options, fn);
}

debug('new %s', path);
debug('new %o', path)
var opts = options || {};

this.handle = fn;
Expand Down
4 changes: 2 additions & 2 deletions lib/router/route.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function Route(path) {
this.path = path;
this.stack = [];

debug('new %s', path);
debug('new %o', path)

// route handlers for various http methods
this.methods = {};
Expand Down Expand Up @@ -196,7 +196,7 @@ methods.forEach(function(method){
throw new Error(msg);
}

debug('%s %s', method, this.path);
debug('%s %o', method, this.path)

var layer = Layer('/', {}, handle);
layer.method = method;
Expand Down

0 comments on commit 8b6dc6c

Please sign in to comment.