GitXplorerGitXplorer
o

log4js-fluent-appender

public
2 stars
3 forks
2 issues

Commits

List of commits on branch master.
Verified
099c561911f377bf80f3799a6d9c1da081955fbd

Merge pull request #9 from okkez/add-github-actions

ookkez committed 5 years ago
Unverified
d55441ab63426c288acbaa5776dbf6314886b8c8

Add simple workflow for CI

ookkez committed 5 years ago
Verified
cb4265467b358704041a4d12977b2e03213bf81e

Merge pull request #8 from okkez/update-ci-setting

ookkez committed 5 years ago
Unverified
81fca48b03659122a47ab5468e781356af0d7d8e

ci: Update nodejs version

ookkez committed 5 years ago
Verified
d8fab67b57e015ab68e5b0ccb1fe427a821461d2

Remove Events section

ookkez committed 6 years ago
Unverified
b5317e8e8bb8741873960d84c645f986f7db6440

Version 1.0.1

ookkez committed 7 years ago

README

The README file for this repository.

log4js appender for fluent-logger

This package provides log4js-node appender for fluent-logger.

NPM

Build Status

Install

$ npm install log4js-fluent-appender

Prerequistes

Fluent daemon should listen on TCP port.

Simple configuration is following:

<source>
  @type forward
  port 24224
</source>

<match **.*>
  @type stdout
</match>

Usage

const log4js = require('log4js');

log4js.configure({
  appenders: {
    fluent: {
      type: 'log4js-fluent-appender',
      tag_prefix: 'tag_prefix',
      options: {
        levelTag: true,
        host: 'localhost',
        port: 24224
      }
    }
  },
  categories: {
    default: {
      appenders: ['fluent'],
      level: 'info'
    }
  }
});

const logger = log4js.getLogger();

logger.info('This is info message!');

setTimeout(() => {
  log4js.shutdown(() => {});
}, 1000);

See also:

Options

levelTag

If false, tag is "mytag". Otherwise tag is "mytag.INFO". If you want to omit level tag such as .INFO, you must specify this value to false.

See fluent-logger.

License

Apache License, Version 2.0.