mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-16 15:45:13 +00:00
Fix log option to command line commands
This commit is contained in:
+1
-16
@@ -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;
|
||||
|
||||
+1
-1
@@ -126,7 +126,7 @@ module.exports = {
|
||||
'config': {
|
||||
'defaultsPlugins': ["livereload"]
|
||||
},
|
||||
'logLevel': Book.LOG_LEVELS[(kwargs.log).toUpperCase()]
|
||||
'logLevel': kwargs.log
|
||||
}));
|
||||
|
||||
return book.parse()
|
||||
|
||||
Reference in New Issue
Block a user