From 736df1b3af0efd359cd281581ff8505fd211fd3b Mon Sep 17 00:00:00 2001 From: "Navy.gif" Date: Wed, 12 Jan 2022 18:29:14 +0200 Subject: [PATCH] linter pass --- logger/Logger.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/logger/Logger.js b/logger/Logger.js index 5e5ce3c..b3a3d68 100644 --- a/logger/Logger.js +++ b/logger/Logger.js @@ -17,17 +17,17 @@ const Constants = { class Logger { - constructor(client, options) { + constructor (client, options) { this.client = client; this.options = options; const transports = [ - new FileExtension({ filename: `logs/${this.date.split(' ')[0]}.log`, level: 'debug' }), //Will NOT log "silly" logs, could change in future. + new FileExtension({ filename: `logs/${this.date.split(' ')[0]}.log`, level: 'debug' }), // Will NOT log "silly" logs, could change in future. new FileExtension({ filename: `logs/errors/${this.date.split(' ')[0]}-error.log`, level: 'error' }), - new Console({ level: 'silly' }) //Will log EVERYTHING. + new Console({ level: 'silly' }) // Will log EVERYTHING. ]; - if (!options.webhook.disabled) transports.push(new DiscordWebhook({ level: 'error', ...options.webhook })); //Broadcast errors to a discord webhook. + if (!options.webhook.disabled) transports.push(new DiscordWebhook({ level: 'error', ...options.webhook })); // Broadcast errors to a discord webhook. this.logger = createLogger({ levels: config.npm.levels, @@ -38,11 +38,11 @@ class Logger { transports }); - //TODO: Add proper date-oriented filenames and add a daily rotation file (?). + // TODO: Add proper date-oriented filenames and add a daily rotation file (?). } - write(type = 'silly', string = '') { + write (type = 'silly', string = '') { const color = Constants.Colors[type]; const header = `${chalk[color](`[${this.date}][modmail]`)}`; @@ -52,23 +52,23 @@ class Logger { } - get date() { + get date () { return moment().format("YYYY-MM-DD hh:mm:ss"); } - info(message) { + info (message) { this.write('info', message); } - warn(message) { + warn (message) { this.write('warn', message); } - error(message) { + error (message) { this.write('error', message); } - debug(message) { + debug (message) { this.write('debug', message); }