diff --git a/middleware/logger/Logger.js b/middleware/logger/Logger.js index cbedac7..9fa78ee 100644 --- a/middleware/logger/Logger.js +++ b/middleware/logger/Logger.js @@ -3,7 +3,7 @@ const { combine, label, printf } = format; const moment = require('moment'); const chalk = require('chalk'); -const { DiscordWebhook } = require('./transports/'); +const { DiscordWebhook, ExtendedConsole } = require('./transports/'); const regex = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g //removes chalk formatting, will be used for the log FILES. @@ -19,7 +19,8 @@ class Logger { format.simple() ), transports: [ - new transports.Console(), + new ExtendedConsole(), + //new transports.Console(), new transports.File({ filename: `logs/what.log` }), new transports.File({ filename: `logs/${this.date.replace(/ /g, '-')}-error.log`, level: 'error' }), new DiscordWebhook({ level: 'error' }) //Broadcast errors to a discord webhook. @@ -30,7 +31,7 @@ class Logger { .on('shardCreate', (shard) => this.write(shard, "Shard created.", 'debug')) .on('message', (shard, message) => this._handleMessage(shard, message)); - console.log("FUCK"); + //console.log("FUCK"); this.logger.log('info', "Why tf isnt this working..."); this.logger.log('error', "THERES A FUCKIN ERROR"); @@ -54,10 +55,10 @@ class Logger { if(!config.npm.levels[type]) return undefined; const color = Constants.Colors[type]; - const header = `${chalk[color](`[${this.date}][shard-${this._shardId(shard)}]`)}`; + const header = `[${this.date}][shard-${this._shardId(shard)}]`;//`${chalk[color](`[${this.date}][shard-${this._shardId(shard)}]`)}`; //[04/02/2020 12:52:20][shard-00] - this.logger.log(type, `${header} ${string}`) + this.logger.log(type, `${header} ${string}`); } diff --git a/middleware/logger/transports/index.js b/middleware/logger/transports/index.js index d1bb9a6..1f87e7e 100644 --- a/middleware/logger/transports/index.js +++ b/middleware/logger/transports/index.js @@ -1,3 +1,5 @@ +/* eslint-disable linebreak-style */ module.exports = { - DiscordWebhook: require('./DiscordWebhook.js') -} \ No newline at end of file + DiscordWebhook: require('./DiscordWebhook.js'), + ExtendedConsole: require('./ExtendedConsole.js') +}; \ No newline at end of file