From f95beed58bf1d7aa7bedff774ee054d1e35f0fc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samy=20Pess=C3=A9?= Date: Wed, 28 Jan 2015 19:18:01 +0100 Subject: [PATCH] Fix log option to command line commands --- lib/book.js | 17 +---------------- lib/index.js | 2 +- 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/lib/book.js b/lib/book.js index 62fe0dba5..24ab5050e 100644 --- a/lib/book.js +++ b/lib/book.js @@ -33,7 +33,7 @@ var Book = function(root, context, parent) { }, // Log level - logLevel: Book.LOG_LEVELS.INFO + logLevel: logger.LEVELS }); // Log @@ -93,21 +93,6 @@ var Book = function(root, context, parent) { _.bindAll(this); }; -Book.LOG_LEVELS = { - DEBUG: 0, - INFO: 1, - WARNING: 2, - ERROR: 3, - DISABLED: 10 -}; -Book.LOG_COLORS = { - DEBUG: color.purple, - INFO: color.cyan, - WARNING: color.yellow, - ERROR: color.red, - DISABLED: 10 -}; - // Initialize and parse the book: config, summary, glossary Book.prototype.parse = function() { var that = this; diff --git a/lib/index.js b/lib/index.js index febd11abe..35322fbda 100644 --- a/lib/index.js +++ b/lib/index.js @@ -126,7 +126,7 @@ module.exports = { 'config': { 'defaultsPlugins': ["livereload"] }, - 'logLevel': Book.LOG_LEVELS[(kwargs.log).toUpperCase()] + 'logLevel': kwargs.log })); return book.parse()