add debug() for .listen() and .keys=

master
TJ Holowaychuk 2013-11-26 21:26:05 -08:00
parent e447e731b6
commit 309f2ac00e
1 changed files with 2 additions and 0 deletions

View File

@ -63,6 +63,7 @@ Application.prototype.__proto__ = Emitter.prototype;
*/
app.listen = function(){
debug('listen');
var server = http.createServer(this.callback());
return server.listen.apply(server, arguments);
};
@ -116,6 +117,7 @@ app.callback = function(){
app.__defineSetter__('keys', function(keys){
var ok = Array.isArray(keys) || keys instanceof Keygrip;
debug('keys %j', keys);
if (!ok) throw new TypeError('app.keys must be an array or Keygrip');
if (!(keys instanceof Keygrip)) keys = new Keygrip(keys);
this._keys = keys;