diff options
author | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2017-01-30 23:36:47 -0800 |
---|---|---|
committer | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2017-01-30 23:36:47 -0800 |
commit | 1a0532b77bc333454c4fcdcb3d992ca53f56ba16 (patch) | |
tree | df2bca0cd5c8b17d6cc16fed53d569c6b57f10e9 | |
parent | fe747d3f16ebd3485c9419f36ce940aa1df5037d (diff) | |
download | patchfoo-1a0532b77bc333454c4fcdcb3d992ca53f56ba16.tar.gz patchfoo-1a0532b77bc333454c4fcdcb3d992ca53f56ba16.zip |
Simplify log prefix
-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 |