Adding winston cli output
Defaults to colorized 'info' level output Accessed via waz.output property
This commit is contained in:
Родитель
fd6c4af4c8
Коммит
87f481635e
|
@ -2,7 +2,18 @@ var commander = require('commander');
|
|||
var fs = require('fs');
|
||||
var path = require('path');
|
||||
|
||||
var waz = new commander.Command();
|
||||
var waz = new commander.Command();
|
||||
|
||||
waz.output = require('winston');
|
||||
|
||||
waz.output.setLevel = function (level) {
|
||||
waz.output.remove(waz.output.transports.Console);
|
||||
waz.output.add(waz.output.transports.Console, { level: level });
|
||||
waz.output.cli();
|
||||
};
|
||||
|
||||
waz.output.setLevel('info');
|
||||
|
||||
|
||||
waz.categories = {};
|
||||
|
||||
|
|
|
@ -19,7 +19,8 @@
|
|||
"underscore": ">= 1.3.1",
|
||||
"underscore.string": ">= 2.0.0",
|
||||
"tunnel": ">= 0.0.1",
|
||||
"commander": ">= 0.5.2"
|
||||
"commander": ">= 0.5.2",
|
||||
"winston": ">= 0.5.10"
|
||||
},
|
||||
"devDependencies": {
|
||||
"mocha": "*",
|
||||
|
|
Загрузка…
Ссылка в новой задаче