1.1.1 • Published 4 years ago

@vanioinformatika/express-logger v1.1.1

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

Express console and fluentd logger

Build Status

Logger is configured to log messages to the console and fluentd.

When creating new logger instance need to pass logLevel and optional fluentConfig.

Fluentd logging is enabled via config.

Usage

const createLogger = require('@vanioinformatika/express-logger').createLogger

const logLevel = 'info'
const fluentConfig = {
  enabled: true,
  tag: 'application tag',
  config: {
    host: 'localhost',
    port: 12345
  }
}

const logger = createLogger(logLevel, fluentConfig)

logger.info('Message')

Examples

Initialize logger only with console logger:

const logger = createLogger('info')

Initialize logger with console and fluent logger:

const logger = createLogger('info', {
  enabled: true,
  tag: 'application-name',
  config: {
    host: 'localhost',
    port: 12345
  }
})
1.1.1

4 years ago

1.1.0

4 years ago

1.0.0

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago