How to use the pino-pretty.asMetaWrapper function in pino-pretty

To help you get started, we’ve selected a few pino-pretty examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pinojs / pino / lib / tools.js View on Github external
function getPrettyStream (opts, prettifier, dest) {
  if (prettifier && typeof prettifier === 'function') {
    return prettifierMetaWrapper(prettifier(opts), dest)
  }
  try {
    var prettyFactory = require('pino-pretty')
    prettyFactory.asMetaWrapper = prettifierMetaWrapper
    return prettifierMetaWrapper(prettyFactory(opts), dest)
  } catch (e) {
    throw Error('Missing `pino-pretty` module: `pino-pretty` must be installed separately')
  }
}

pino-pretty

Prettifier for Pino log lines

MIT
Latest version published 1 month ago

Package Health Score

89 / 100
Full package analysis

Popular pino-pretty functions