1.0.2 • Published 5 years ago
djs-logger v1.0.2
DJS Logger
A simple yet powerful logging system that logs errors, saves them, and sends them to channels. Fully Customisable.
const { log } = require("djs-logger");
log({
save: true,
savefile: 'C:|Users|ExampleUser|Desktop|logs.txt',
error: "Test"
});
How to use
This package is easy to use and can be used in a number of locations. The most common being in a .catch()
Required
save
- true or falsediscord
- true or falseerror
- error message
Example:
log({
save: false,
discord: false,
error: "example error"
})
Save
When using save: true
you need to supply:
savefile
- Save file location The save file location must look like this: -C:|Users|ExampleUser|Desktop|logs.txt
with all the\
in your file path replaced with|
Discord
When using discord: true
you need to supply:
channel
- The name of the channel the error message should go in (Case Sensitive)messagelinker
- The message from yourbot.on("message")
Features
- Save errors to file
- Errors put into console
- Errors sent to discord channel
Help
- GHOST#7524