Skip to content

UniquePixels/pino-discord-webhook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pino Discord Webhook Transport

A Pino v7+ transport to send events to Discord

Installation

npm install --save pino-discord-webhook

Usage

You will need to create a webhook on your discord server and copy the URL. It is recommended that you protect this URL like other secrets to avoid your channel being spammed by others.

import pino from 'pino'

const logger = pino({
  transport: {
    target: 'pino-discord-webhook',
    options: {
      webhookURL: 'https://discord.com/api/webhooks/xxxx/xxxx',
    }
  }
})

logger.info('test log!');

About

A Pino v7+ compatible transport to forward log events to a Discord webhook from a dedicated worker

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

Contributors