Use robot.logger
This commit is contained in:
parent
5259b56e53
commit
462efcefbd
4
index.js
4
index.js
@ -44,7 +44,7 @@ module.exports = async function(robot) {
|
||||
try {
|
||||
wallet = await ethers.Wallet.fromEncryptedWallet(walletJson, process.env.KREDITS_WALLET_PASSWORD);
|
||||
} catch(error) {
|
||||
console.log('[hubot-kredits] Could not load wallet:', error);
|
||||
robot.logger.warn('[hubot-kredits] Could not load wallet:', error);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
@ -64,7 +64,7 @@ module.exports = async function(robot) {
|
||||
try {
|
||||
kredits = await Kredits.setup(ethProvider, wallet, ipfsConfig);
|
||||
} catch(error) {
|
||||
console.log('[hubot-kredits] Could not set up kredits:', error);
|
||||
robot.logger.warn('[hubot-kredits] Could not set up kredits:', error);
|
||||
process.exit(1);
|
||||
}
|
||||
const Contributor = kredits.Contributor;
|
||||
|
@ -29,7 +29,7 @@ module.exports = async function(robot, kredits) {
|
||||
robot.logger.debug('[kredits] proposal created:', util.inspect(result));
|
||||
});
|
||||
}).catch((error) => {
|
||||
console.log([hubot-kredits] Error:, error);
|
||||
robot.logger.info(`[hubot-kredits] Error:`, error);
|
||||
messageRoom(`I wanted to propose giving kredits to ${githubUser} for ${url}, but I can't find their contact data. Please add them as a contributor: https://kredits.kosmos.org`);
|
||||
});
|
||||
}
|
||||
@ -65,7 +65,7 @@ module.exports = async function(robot, kredits) {
|
||||
|
||||
let amount = amountFromIssueLabels(issue);
|
||||
if (amount === 0) {
|
||||
console.log('[hubot-kredits] Proposal amount from issue label is zero; ignoring');
|
||||
robot.logger.info('[hubot-kredits] Proposal amount from issue label is zero; ignoring');
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
@ -112,7 +112,7 @@ module.exports = async function(robot, kredits) {
|
||||
.then(issue => {
|
||||
let amount = amountFromIssueLabels(issue);
|
||||
if (amount === 0) {
|
||||
console.log('[hubot-kredits] Proposal amount from issue label is zero; ignoring');
|
||||
robot.logger.info('[hubot-kredits] Proposal amount from issue label is zero; ignoring');
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user