Skip to content

Commit

Permalink
More clean up of log levels and messages
Browse files Browse the repository at this point in the history
  • Loading branch information
alxndrsn committed May 31, 2017
1 parent 0cb0b45 commit ec88244
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions bin/medic-conf
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ switch(process.argv.length) {
const action = process.argv[2];

if(supportedActions.includes(action)) {
const log = require('../src/lib/log');
const info = require('../src/lib/log').info;

log('##', `Performing ${action} on ${instanceUrl}...`);
info(`Performing ${action} on ${instanceUrl}...`);
return require(`../src/fn/${action}`)(project, couchUrl)
.then(() => log('##', action, 'complete.'));
.then(() => info(action, 'complete.'));
}
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "medic-configurer-beta",
"version": "1.0.12",
"version": "1.0.13",
"description": "Configure Medic Mobile deployments",
"main": "index.js",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions src/lib/log.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = (...args) => logAtLevel('INFO', ...args);
module.exports.info = module.exports;
module.exports = (...args) => logAtLevel('TRACE', ...args);
module.exports.info = (...args) => logAtLevel('INFO', ...args);
module.exports.warn = (...args) => logAtLevel('WARN', ...args);

function logAtLevel(level, ...args) {
Expand Down

0 comments on commit ec88244

Please sign in to comment.