aboutsummaryrefslogtreecommitdiff
path: root/lib/app.js
diff options
context:
space:
mode:
authorcel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2017-01-30 23:36:47 -0800
committercel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2017-01-30 23:36:47 -0800
commit1a0532b77bc333454c4fcdcb3d992ca53f56ba16 (patch)
treedf2bca0cd5c8b17d6cc16fed53d569c6b57f10e9 /lib/app.js
parentfe747d3f16ebd3485c9419f36ce940aa1df5037d (diff)
downloadpatchfoo-1a0532b77bc333454c4fcdcb3d992ca53f56ba16.tar.gz
patchfoo-1a0532b77bc333454c4fcdcb3d992ca53f56ba16.zip
Simplify log prefix
Diffstat (limited to 'lib/app.js')
-rw-r--r--lib/app.js12
1 files changed, 3 insertions, 9 deletions
diff --git a/lib/app.js b/lib/app.js
index a7533ce..7645cd1 100644
--- a/lib/app.js
+++ b/lib/app.js
@@ -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