diff options
-rw-r--r-- | lib/app.js | 12 |
1 files changed, 3 insertions, 9 deletions
@@ -45,15 +45,9 @@ App.prototype.go = function () { }) } -App.prototype.logPrefix = ['[' + pkg.name + ']'] - -App.prototype.log = function () { - console.log.apply(console, [].concat.apply(this.logPrefix, arguments)) -} - -App.prototype.error = function () { - console.error.apply(console, [].concat.apply(this.logPrefix, arguments)) -} +var logPrefix = '[' + pkg.name + ']' +App.prototype.log = console.log.bind(console, logPrefix) +App.prototype.error = console.error.bind(console, logPrefix) App.prototype.unboxMsg = function (msg, cb) { var self = this |