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