1.0.7 • Published 16 days ago

pino-global-webhook v1.0.7

Weekly downloads
-
License
MIT
Repository
github
Last release
16 days ago

If have a webhook then i will send

Use

const url = 'MyWebHook Url';
import { createTransport } from "pino-global-webhook";
const logger = pino(
  createTransport({
    webhooks: [
      url
    ],
  })
);
logger.info("hello world");
logger.warn("hello world");

#Configs

createTransport({
    webhooks: [], //urls
    discord:{
        webhookType: 1, //1| 2| 3 Discord webhook types
        colors:{ //Hexadecimal colors and default colors 
          TRACE: 0x808080, 
          DEBUG: 0x008000,
          INFO: 0x00bfff,
          WARN: 0xffa500,
          ERROR: 0xff4500,
          FATAL: 0xff0000,
          OTHERS: 0x440f3c,
        },
        sameAgent: true, // if you will use a new agent in every webhook
        removeTag:["level"], // Remove a tag from the log
        withWordRemoveTag : "coffe" ,// When find the word will delete the tag
        customTags: [{"mateus":"hello"}] // Add your custom tags from the log :D
    },
    slack:{/* same at discord without "colors" and "webhooktype" */},
    others:{/* same at discord without "colors" and "webhooktype" */},
  })

#Test |Webhook|Status| | --- | :---: | |Discord| ✅| |Slack| 🚧| |Others| 🚧|

1.0.7

16 days ago

1.0.6

29 days ago

1.0.5

1 month ago

1.0.4

1 month ago

1.0.3

1 month ago

1.0.2

1 month ago

1.0.1

1 month ago

1.0.0

2 months ago