summaryrefslogtreecommitdiff
path: root/index.js
diff options
context:
space:
mode:
authorAlejandro W. Sior <aho@sior.be>2024-01-25 00:08:04 +0100
committerAlejandro W. Sior <aho@sior.be>2024-01-25 00:08:04 +0100
commita0a884ebed701f025434881a8c88bd9c28812567 (patch)
tree90187ef2fdf825d27819a45e279961daf16d85f2 /index.js
parent4eaca0632036c77fc0df7ebe84e530c62a349091 (diff)
remove dependenciesraccoon
Diffstat (limited to 'index.js')
-rw-r--r--index.js20
1 files changed, 1 insertions, 19 deletions
diff --git a/index.js b/index.js
index 8247028..4c31341 100644
--- a/index.js
+++ b/index.js
@@ -1,25 +1,7 @@
const Troffman = require('./src/Troffman');
-const winston = require('winston');
-
-global.Logger = winston.createLogger({
- levels: winston.config.npm.levels,
- format: winston.format.printf(info => {
- let date = new Date();
- return `[${date.getDate()}/${(date.getMonth() + 1)}/${date.getFullYear()}-${date.getHours()}:${date.getMinutes()}:${date.getSeconds()}][${info.level.toUpperCase()}] ${info.message}`;
- }),
-});
const bot = new Troffman('./config.toml');
-if (bot.config.logging.console.enabled) {
- Logger.add(new winston.transports.Console({ level: bot.config.logging.console.minimal }));
-}
-
-if (bot.config.logging.file.enabled && bot.config.logging.file.path) {
- Logger.add(new winston.transports.File({ filename: bot.config.logging.file.path, level: bot.config.logging.file.minimal }));
- Logger.verbose(`Now logging to file ${bot.config.logging.file.path} with minimal level ${bot.config.logging.file.minimal}`);
-}
-
-Logger.verbose('Connecting the bot');
+console.log('Connecting the bot');
bot.connect();