/* eslint-disable no-console, arrow-body-style */
const winston = require("winston");
/**
* Logger for the ModzClient
*/
/**
* Error logger
* @param {String} err - The error to log
*/
const error = err => {
if (!err) {
throw new RangeError(`Cannot send an empty error to the console.`);
}
return winston.error(`[ERROR]: ${err}`);
};
/**
* Used to log things to the console
* @param {String} content - The content to log
*/
const log = content => {
return winston.log(`[APP]: ${content}`);
};
/**
* Sends a warning to the console
* @param {String} content - Warn message
*/
const warn = content => {
return winston.warn(`[WARN]: ${content}`);
};
/**
* Sends info to the console
* @param {String} content - The info message
*/
const info = content => {
return winston.info(`[INFO]: ${content}`);
};
module.exports = {
info,
warn,
log,
error
};