UNPKG

dogstack

Version:

a popular-choice grab-bag framework for teams working on production web apps

21 lines (16 loc) 376 B
const Pino = require('pino') const prettyPino = require('pino-colada') module.exports = createLog function createLog (options = {}) { const { name, level = 'info', pretty = process.env.NODE_ENV !== 'production', } = options var stream if (pretty) { stream = prettyPino() stream.pipe(process.stdout) } return Pino({ name, level }, stream) }