8000 GitHub - vanioinformatika/node-express-logger
[go: up one dir, main page]

Skip to content
Notifications You must be signed in to change notification settings

vanioinformatika/node-express-logger

Folders and files

Repository files navigation

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
  }
})

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published
0
NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits