Skip to content

knovator/winston-rocket-chat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

winston-RocketChat-webhook-transport

A Rocket chat transport for Winston 3+ that logs to a channel via webhooks.

Installation

npm install winston @knovator/winston-rocket-chat

Usage

Set up with transports

const winston = require("winston");
const {RocketChatHook} = require("@knovator/winston-rocket-chat");

const logger = winston.createLogger({
    level: "info",
    transports: [
        new RocketChatHook({
            webhookUrl: "https://knovator.rocket.chat/hooks/XXXXX/XXXX"
        })
    ]
});

logger.info("This should now appear on Rocket Chat");

Set up by adding

const winston = require("winston");
const {RocketChatHook} = require("@knovator/winston-rocket-chat");

const logger = winston.createLogger({});

logger.add(new RocketChatHook({ webhookUrl: "https://knovator.rocket.chat/hooks/XXXXX/XXXX" }));

Options

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published