From d540ce2d12aed329324cd094b025ce6c868b5686 Mon Sep 17 00:00:00 2001 From: chris062689 Date: Wed, 2 Aug 2017 19:11:05 -0400 Subject: [PATCH] Tweaked logging levels. Removed informational message when triggering triggers. Removed Github info message displaying the URL. --- data.js | 4 ++-- server.js | 4 ++-- triggers/github.js | 2 -- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/data.js b/data.js index 391670e..480fa98 100644 --- a/data.js +++ b/data.js @@ -8,7 +8,7 @@ function readWarnings() { if (err && err.code === 'ENOENT') { return; } if (err) { logger.error(err); } app.warnings = JSON.parse(data); - logger.info('Loaded warnings file.'); + logger.debug('Loaded warnings file.'); }); } @@ -18,7 +18,7 @@ function readBans() { if (err && err.code === 'ENOENT') { return; } if (err) { logger.error(err); } app.bans = JSON.parse(data); - logger.info('Loaded bans file.'); + logger.debug('Loaded bans file.'); }); } diff --git a/server.js b/server.js index 8cdd637..cbe2592 100644 --- a/server.js +++ b/server.js @@ -76,7 +76,7 @@ client.on('message', message => { // Check access permissions. if (cachedModule.roles != undefined && findArray(message.member.roles.map(function(x) { return x.name; }), cachedModule.roles) == false) { app.logChannel.sendMessage(`${message.author} attempted to use admin command: ${message.content}`); - logger.info(`${message.author.username} ${message.author} attempted to use admin command: ${message.content}`) + logger.info(`${message.author.username} ${message.author} attempted to use admin command: ${message.content}`); return false; } @@ -112,7 +112,7 @@ client.on('message', message => { cachedTriggers.forEach(function(trigger) { if (trigger.roles == undefined || findArray(message.member.roles.map(function(x) { return x.name; }), trigger.roles)) { if (trigger.trigger(message) == true) { - logger.info(`${message.author.username} ${message.author} [Channel: ${message.channel}] triggered: ${message.content}`); + logger.debug(`${message.author.username} ${message.author} [Channel: ${message.channel}] triggered: ${message.content}`); try { trigger.execute(message); } catch (err) { logger.error(err); } diff --git a/triggers/github.js b/triggers/github.js index 0d172af..a090768 100644 --- a/triggers/github.js +++ b/triggers/github.js @@ -22,8 +22,6 @@ exports.execute = function(message) { } let url = `https://github.com/citra-emu/citra/pull/${match[1]}`; - logger.info(url); - request(url, function (error, response, body) { if (!error && response.statusCode == 200) { message.channel.sendMessage(`Github Pull Request: ${url}`);