env-pino

Config pino via environment variables.

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
env-pino
001.0.15 years ago5 years agoMinified + gzip package size for env-pino in KB

Readme

Env Pino
Config pino via environment variables.

Usage

  1. Install Package

npm i --save env-pino

  1. Set Environments

export PINO="{\"prettyPrint\": true}"

or
export PINO_PRETTY_PRINT=true
export PINO_LEVEL=error

Note: the latter format will override the corresponding fields defined in the former format.

  1. Use Pino

const logger = require('env_pino')

// logger is already configged via env variables
logger.info('...')

Reference

License

MIT