[Pkg-javascript-commits] [node-coveralls] 172/332: log at error level by default and only show others if --verbose switch is on.

Bastien Roucariès rouca at moszumanska.debian.org
Thu Nov 9 13:53:56 UTC 2017


This is an automated email from the git hooks/post-receive script.

rouca pushed a commit to branch master
in repository node-coveralls.

commit 1457b3fdadd8399b89d0fc522d90525e52ea6473
Author: Gregg Caines <gregg at caines.ca>
Date:   Thu Jul 3 10:02:06 2014 -0700

    log at error level by default and only show others if --verbose switch is on.
---
 lib/getOptions.js  | 4 +++-
 lib/logger.js      | 4 ++--
 package.json       | 2 +-
 test/getOptions.js | 8 ++++++--
 test/logger.js     | 8 ++++----
 5 files changed, 16 insertions(+), 10 deletions(-)

diff --git a/lib/getOptions.js b/lib/getOptions.js
index b75bb96..b5e041f 100644
--- a/lib/getOptions.js
+++ b/lib/getOptions.js
@@ -16,12 +16,14 @@ var getBaseOptions = function(cb){
     git_branch = process.env.TRAVIS_BRANCH;
   }
 
+  /*
   if (process.env.DRONE){
     options.service_name = 'drone';
     options.service_job_id = process.env.DRONE_BUILD_NUMBER;
     git_commit = process.env.DRONE_COMMIT;
     git_branch = process.env.DRONE_BRANCH;    
-  }  
+  }
+  */
 
   if (process.env.JENKINS_URL){
     options.service_name = 'jenkins';
diff --git a/lib/logger.js b/lib/logger.js
index 30a6c60..9c27e0b 100644
--- a/lib/logger.js
+++ b/lib/logger.js
@@ -4,9 +4,9 @@ module.exports = function(){
 
 function getLogLevel(){
   if (hasVerboseCommandLineOption() || hasDebugEnvVariable()) {
-    return 'debug';
+    return 'warn';
   }
-  return 'warn';
+  return 'error';
 }
 
 function hasVerboseCommandLineOption(){
diff --git a/package.json b/package.json
index 9fff71a..a583cb7 100644
--- a/package.json
+++ b/package.json
@@ -5,7 +5,7 @@
     "coverage",
     "coveralls"
   ],
-  "version": "2.10.1",
+  "version": "2.11.0",
   "bugs": {
     "url": "https://github.com/cainus/node-coveralls/issues"
   },
diff --git a/test/getOptions.js b/test/getOptions.js
index a0aef46..1d3c6d1 100644
--- a/test/getOptions.js
+++ b/test/getOptions.js
@@ -49,9 +49,11 @@ describe("getBaseOptions", function(){
   it ("should set service_name and service_job_id if it's running on codeship", function(done){
     testCodeship(getBaseOptions, done);
   });
+  /*
   it ("should set service_name and service_job_id if it's running on drone", function(done){
     testDrone(getBaseOptions, done);
-  });  
+  });
+  */
 });
 
 describe("getOptions", function(){
@@ -122,9 +124,11 @@ describe("getOptions", function(){
   it ("should set service_name and service_job_id if it's running on codeship", function(done){
     testCodeship(getOptions, done);
   });
+  /*
   it ("should set service_name and service_job_id if it's running on drone", function(done){
     testDrone(getBaseOptions, done);
-  });  
+  });
+  */
 });
 
 var testServiceJobId = function(sut, done){
diff --git a/test/logger.js b/test/logger.js
index 61d20bc..15767ff 100644
--- a/test/logger.js
+++ b/test/logger.js
@@ -6,27 +6,27 @@ describe("logger", function(){
   it ("should log at debug level when --verbose is set", function(){
     process.argv[2] = '--verbose';
     var logger = require('../index').logger();
-    logger.level.should.equal('debug');
+    logger.level.should.equal('warn');
   });
 
   it ("should log at debug level when NODE_COVERALLS_DEBUG is set in env", function(){
     process.argv = [];
     process.env.NODE_COVERALLS_DEBUG = 1;
     var logger = require('../index').logger();
-    logger.level.should.equal('debug');
+    logger.level.should.equal('warn');
   });
 
   it ("should log at debug level when NODE_COVERALLS_DEBUG is set in env as a string", function(){
     process.argv = [];
     process.env.NODE_COVERALLS_DEBUG = '1';
     var logger = require('../index').logger();
-    logger.level.should.equal('debug');
+    logger.level.should.equal('warn');
   });
 
   it ("should log at warn level when NODE_COVERALLS_DEBUG not set and no --verbose", function(){
     process.argv = [];
     process.env.NODE_COVERALLS_DEBUG = 0;
     var logger = require('../index').logger();
-    logger.level.should.equal('warn');
+    logger.level.should.equal('error');
   });
 });

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-coveralls.git



More information about the Pkg-javascript-commits mailing list