llr

log4js-logstash-redis

A simple log appender for log4js that sends the data to logstash by redis.

Showing:

Popularity

Downloads/wk

9

GitHub Stars

5

Maintenance

Last Commit

2yrs ago

Contributors

1

Package

Dependencies

2

Size (min+gzip)

71.7KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

log4js-logstash-redis

node version build status David deps

A simple log appender for log4js that sends the data to logstash by redis.

Installation

npm install log4js-logstash-redis --save

Usage: logstash configuration

In the "input" part of the logstash server conf :

input {
  redis {
    codec => json
    data_type => "list"
    key => "YOURKEY"
  }
}

Usage: log4js configuration

Plain javascript

const log4js = require('log4js');
log4js.configure({
  appenders: {
    logstash_redis: {
      type: 'log4js-logstash-redis',
      key: 'YOURKEY',
      redis: {
        host: 'localhost',
        port: 6379,
        db: 0 // default 0
      },
    },
  },
  categories: { default: { appenders: [ 'logstash_redis' ], level: 'debug' }}
});

const logger = log4js.getLogger();

logger.debug('hello hello');

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100