1.0.3 • Published 4 years ago

@ninedevs/bunyan-discord v1.0.3

Weekly downloads
24
License
ISC
Repository
github
Last release
4 years ago

bunyan-discord

This library will send logs to a Discord channel through a webhook.

Getting Started

Install the package;

npm i @ninedevs/bunyan-discord

Usage

const { DiscordStream } = require('@ninedevs/bunyan-discord')
const bunyan = require('bunyan')

const logger = bunyan.createLogger({
    name: 'ExampleApp',
    stream: new DiscordStream({
        webhookUrl: 'https://discord.com/api/webhooks/0123456789'
    })
})

logger.error(new Error('Something failed'))