2.1.0 • Published 3 years ago

rf-discord-logger v2.1.0

Weekly downloads
10
License
ISC
Repository
-
Last release
3 years ago

rf-discord-logger

image

a utility to send logs to a discord channel using webhooks

usage

think of this as a normal console logger, but sends the logs to a discord channel, using webhooks.

const DiscordLogger = require("rf-discord-logger")
const logger = new DiscordLogger({
	name: "discordLogger", // name your logger, defaults to "logger"
	url: process.env.URL, // webhook url
	icons: false // show icons instead of [LOG], [WARN], etc.
})


logger.log("this is a log")
// [LOG] this is a log
logger.log("this is a log", {name: "newLoggerName"}) // changes the username of the bot on the fly
logger.info("this is info")
logger.warn("this is a warning")
logger.error("this is an error")
logger.debug("this is a debug")

methods

.log(message, opts)

.info(message, opts)

.warn(message, opts)

.error(message, opts)

.debug(message, opts)

2.1.0

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago