| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Push log events to a Rabbitmq MQ. Require log4js-node 2.x or later.
npm install @log4js-node/rabbitmqIf you want to be sure that all messages have been sent before your programme exits, remember to call log4js.shutdown(<callback function>).
The appender will use the RabbitMQ Routing model command to send the log event messages to the channel.
log4js.configure({
appenders: {
mq: {
type: '@log4js-node/rabbitmq',
host: '127.0.0.1',
port: 5672,
username: 'guest',
password: 'guest',
routing_key: 'logstash',
exchange: 'exchange_logs',
mq_type: 'direct',
durable: true
}
},
categories: { default: { appenders: ['mq'], level: 'info' } }
});This configuration will push log messages to the rabbitmq on 127.0.0.1:5672.
| Back | FazBrowse Home | New Git URL |