DiscordTickets/src/logger.js
Puneet Gopinath 0f10908ee0
refactor: update to discord.js v13 (#203)
* build: bump djs version

* refactor(add): update

* refactor(blacklist): update

* refactor(close): update

* refactor(help): update

* refactor(new): update

* refactor(panel): update

* refactor(remove): update

* refactor(stats): update

* refactor(survey): update

* refactor(tag): update

* refactor(topic): update

* refactor(guild): update, now Structures doesn't exist

Also I don't know if this would work actually, let's see

* refactor(guild_member)

* refactor(index.js): add intents

I can't understand how you do the indentation, sorry if I made a mistake

* Update package.json

* fix(intents): add `DIRECT_MESSAGES` intents


- also fix code style and indentation

* style: fix properties order and indentation

* fix(guild)

* Update and rename message.js to messageCreate.js

* Update guild.js

* refactor(manager): fix

* Update manager.js

* fix(help)

* style: fix spacing

* fix: permission overwrites

* fix(new)

* fix(presence): rename activity to activities

* fix(presence): fix debug message

* fix: update channel types

* Update new.js

* fix(embeds): update footer function

* fix: broken code

* style: add new lines around embed blocks

* fix(messages): update remaining `send()` calls

* fix(messages): i missed one

* build: replace fastify logger with standard logger

* refactor: update message and reaction collectors

Co-authored-by: Isaac <git@eartharoid.me>
2021-08-16 21:05:20 +01:00

39 lines
1.3 KiB
JavaScript

const { path } = require('./utils/fs');
const config = require('../user/config');
const Logger = require('leekslazylogger');
module.exports = new Logger({
debug: config.debug,
directory: path('./logs/'),
keepFor: config.logs.keep_for,
levels: {
_logger: { format: '&f&!7{timestamp}&r [LOGGER] {text}' },
basic: { format: '&f&!7{timestamp} {text}' },
commands: {
format: '&f&!7{timestamp}&r &3[INFO] &d(COMMANDS)&r {text}',
type: 'info'
},
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}' },
http: {
format: '&f&!7{timestamp}&r &3[INFO] &d(HTTP)&r {text}',
type: 'info'
},
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}' },
ws: {
format: '&f&!7{timestamp}&r &3[INFO] &d(WS)&r {text}',
type: 'info'
}
},
logToFile: config.logs.enabled,
name: 'Discord Tickets by eartharoid',
splitFile: config.logs.split,
timestamp: 'YYYY-MM-DD HH:mm:ss'
});