UNPKG

332 BJavaScriptView Raw
1var index = require('../index');
2
3module.exports = function(){
4 return require('log-driver')({level : getLogLevel()});
5};
6
7function getLogLevel(){
8 if (index.options.verbose || hasDebugEnvVariable()) {
9 return 'warn';
10 }
11 return 'error';
12}
13
14function hasDebugEnvVariable(){
15 return process.env.NODE_COVERALLS_DEBUG == 1;
16}