DiscordTickets/src/logger.js

39 lines
1.3 KiB
JavaScript
Raw Normal View History

2021-02-27 23:13:46 +02:00
const { path } = require('./utils/fs');
const config = require('../user/config');
const Logger = require('leekslazylogger');
2021-02-27 23:13:46 +02:00
module.exports = new Logger({
feat: #206 convert to interactions (buttons and application commands) (#238) * feat: make command handler slash command-ready Only `help` and `settings` commands work so far * feat(commands): finish new settings command * fix(settings): convert `roles` and `ping` to an array * fix(commands): make `add` a slash command * fix(commands): make `blacklist` a slash command * fix(commands): remove URLs from `help` command * Add weblate badge and overview image * Update sponsors * sqlite things * imrpovements * update eslint rules * (⚠ untested) close command * fix: default locale for getting command option names * Update README.md * Update README.md * Update README.md * update new command to slash commands and fix close command * fixes and improvements * fix: closing a ticket when the creator has left * Revert "fix: closing a ticket when the creator has left" This reverts commit afc40ae17077782e344fd8cee03a089966c2347e. * fix: closing a ticket when the creator has left * fix: localisation issues in settings command * fix: delete category channel * New button and select panels + updated message panels Includes new options for panel embed message image and thumbnail Co-Authored-By: Puneet Gopinath <baalkrshna@gmail.com> Co-Authored-By: thevisuales <6569806+thevisuales@users.noreply.github.com> * Finish converting to buttons, added close button Co-Authored-By: Puneet Gopinath <baalkrshna@gmail.com> Co-Authored-By: thevisuales <6569806+thevisuales@users.noreply.github.com> * fully convert to slash commands * re-add "... has created a ticket" message * locales * fix add and remove commands * fix remove command * fix stats command * eslint Co-authored-by: Puneet Gopinath <baalkrshna@gmail.com> Co-authored-by: thevisuales <6569806+thevisuales@users.noreply.github.com>
2021-09-24 17:32:36 +03:00
debug: config.developer.debug,
2021-02-27 23:13:46 +02:00
directory: path('./logs/'),
keepFor: config.logs.keep_for,
levels: {
2021-05-22 02:04:18 +03:00
_logger: { format: '&f&!7{timestamp}&r [LOGGER] {text}' },
basic: { format: '&f&!7{timestamp} {text}' },
2021-02-27 23:13:46 +02:00
commands: {
2021-05-22 02:04:18 +03:00
format: '&f&!7{timestamp}&r &3[INFO] &d(COMMANDS)&r {text}',
type: 'info'
2021-03-01 01:57:21 +02:00
},
2021-05-22 02:04:18 +03:00
console: { format: '&f&!7{timestamp} [INFO] {text}' },
debug: { format: '&f&!7{timestamp}&r &1[DEBUG] &9{text}' },
error: { format: '&f&!7{timestamp}&r &4[ERROR] &c{text}' },
2021-03-01 01:57:21 +02:00
http: {
2021-05-22 02:04:18 +03:00
format: '&f&!7{timestamp}&r &3[INFO] &d(HTTP)&r {text}',
type: 'info'
2021-03-01 01:57:21 +02:00
},
2021-05-22 02:04:18 +03:00
info: { format: '&f&!7{timestamp}&r &3[INFO] &b{text}' },
notice: { format: '&f&!7{timestamp}&r &0&!6[NOTICE] {text}' },
plugins: {
format: '&f&!7{timestamp}&r &3[INFO] &d(PLUGINS)&r {text}',
type: 'info'
},
success: { format: '&f&!7{timestamp}&r &2[SUCCESS] &a{text}' },
warn: { format: '&f&!7{timestamp}&r &6[WARN] &e{text}' },
2021-03-01 01:57:21 +02:00
ws: {
2021-05-22 02:04:18 +03:00
format: '&f&!7{timestamp}&r &3[INFO] &d(WS)&r {text}',
type: 'info'
2021-02-27 23:13:46 +02:00
}
2021-05-22 02:04:18 +03:00
},
logToFile: config.logs.enabled,
name: 'Discord Tickets by eartharoid',
splitFile: config.logs.split,
timestamp: 'YYYY-MM-DD HH:mm:ss'
2021-02-27 23:13:46 +02:00
});