summaryrefslogtreecommitdiffstats
path: root/lib/utils/logger.js
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2015-01-28 19:39:41 +0100
committerSamy Pessé <samypesse@gmail.com>2015-01-28 19:39:41 +0100
commit898000a5800d4f319f06937e4a6a2785b694d3b2 (patch)
treefe221fc83411c4f2507a42a7edd7450754190166 /lib/utils/logger.js
parentf95beed58bf1d7aa7bedff774ee054d1e35f0fc0 (diff)
downloadgitbook-898000a5800d4f319f06937e4a6a2785b694d3b2.zip
gitbook-898000a5800d4f319f06937e4a6a2785b694d3b2.tar.gz
gitbook-898000a5800d4f319f06937e4a6a2785b694d3b2.tar.bz2
Fix resources loading in plugins
Diffstat (limited to 'lib/utils/logger.js')
-rw-r--r--lib/utils/logger.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/utils/logger.js b/lib/utils/logger.js
index 9ef9ccf..064c196 100644
--- a/lib/utils/logger.js
+++ b/lib/utils/logger.js
@@ -6,7 +6,8 @@ var LEVELS = {
DEBUG: 0,
INFO: 1,
WARN: 2,
- ERROR: 3
+ ERROR: 3,
+ DISABLED: 10
};
var COLORS = {
@@ -76,7 +77,7 @@ module.exports = function(_write, logLevel) {
return logger.log(level, color.red("ERROR")+"\n");
};
- _.each(LEVELS, function(level, levelKey) {
+ _.each(_.omit(LEVELS, 'DISABLED'), function(level, levelKey) {
levelKey = levelKey.toLowerCase();
logger[levelKey] = _.partial(logger.log, level);