blob: 9c27e0b047e8f6f8a462da02d4de39fe838d005b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
module.exports = function(){
return require('log-driver')({level : getLogLevel()});
};
function getLogLevel(){
if (hasVerboseCommandLineOption() || hasDebugEnvVariable()) {
return 'warn';
}
return 'error';
}
function hasVerboseCommandLineOption(){
return process.argv[2] && ~['-v', '--verbose'].indexOf(process.argv[2]);
}
function hasDebugEnvVariable(){
return process.env.NODE_COVERALLS_DEBUG == 1;
}
|