1.0.3 • Published 12 months ago

log4js-webhook v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

LOG4JS Weebhook Appender

The only webhook appenders for log4js

Install

npm install --save log4js-webhook

Usage

var log4js = require('log4js');
log4js.configure({
    appenders: {
        mycat: {
            type: "log4js-webhook",
            webhook_url: "http://webhook",
            converter: (ctx) => {
                return {
                    text: ctx.formatString()
                };
            }

        }
    },
    categories: { default: { appenders: ["mycat"], level: "debug" } },
});

const logger = log4js.getLogger('test');
logger.info("hello log4js-webhook");

config

  • webhook_url: the webhook url to send, no default, must config one.
  • converter: custom logging event converter for customizing your data

Developed by me.yuhai@gmail.com

1.0.3

12 months ago

1.0.2

12 months ago

1.0.1

12 months ago

1.0.0

12 months ago