aob-logger-wrapper

Wrapper for common logger in node.js microservices

Stats

StarsIssuesVersionUpdatedCreatedSize
aob-logger-wrapper
1.0.103 years ago3 years agoMinified + gzip package size for aob-logger-wrapper in KB

Readme

Usage

$ import logger from 'aob-logger-wrapper' or import { createLogger } from 'aob-logger-wrapper' // With ES6/Babel
$ const logger = require('aob-logger-wrapper') // With ES5

This package exposes following methods | Method | Description | Params | ------ | ------ | ------ | | createLogger | Create Logger Instance | { appName, logLevel, logStreams, logSerializers, logSrc, offset, timezone, appVersion}; | getLogger | Get the logger instance which was created using createLogger method | n/a | getLoggerLevel | Get the logger level | | setLoggerLevel | Set Logger level | Either 'INFO', 'ERROR' | logInfo | log info message | {code, message, req, res, correlationId, deviceInfo, timestamp} | logError | log error message | { code, error, req, res, correlationId, timestamp, message, deviceInfo }

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.