@xanthous/log4js-to-slack
v1.2.0
Published
Slack Appender for log4js-node
Downloads
81
Readme
Slack Appender for log4js-node
npm install @xanthous/log4js-to-slack
Configuration
type
-@xanthous/log4js-to-slack
url
-string
- your slack incomeWebhook url.layout
-object
(optional, defaults tobasicLayout
) - the layout to use for the message (see layouts).
Example
log4js.configure({
appenders: {
alerts: {
type: '@xanthous/log4js-to-slack',
url: 'https://xxxxxx.xxx/xxx',
}
},
categories: {
default: { appenders: ['alerts'], level: 'error' }
}
});