diff options
| author | Alejandro W. Sior <aho@sior.be> | 2024-01-25 00:08:04 +0100 |
|---|---|---|
| committer | Alejandro W. Sior <aho@sior.be> | 2024-01-25 00:08:04 +0100 |
| commit | a0a884ebed701f025434881a8c88bd9c28812567 (patch) | |
| tree | 90187ef2fdf825d27819a45e279961daf16d85f2 /index.js | |
| parent | 4eaca0632036c77fc0df7ebe84e530c62a349091 (diff) | |
remove dependenciesraccoon
Diffstat (limited to 'index.js')
| -rw-r--r-- | index.js | 20 |
1 files changed, 1 insertions, 19 deletions
@@ -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(); |
