an extensible structured logging library with discord webhook support
npm install dslog.js
- custom embed support
- pipe to log file
all config goes into dslog.config.json
in the project root
{
"webhookUrl": "discord wh url"
}
OR
{
"webhooks": ["wh url 1", "wh url 2"]
}
const dslog = require("dslog");
dslog.OK;
dslog.WARN;
dslog.ERROR;
dslog.INFO;
dslog.log(dslog.INFO, "log message");
dslog.log(dslog.INFO, "log message", {
showDate: false,
});
dslog.log(dslog.INFO, "log message", {
objects: [{ value: 1 }, { value: 2 }],
prettyPrint: false, // toggle on if you want indents
});