• File: file.js
  • Full Path: /var/www/nodejs/simo_meps_file_script/node_modules/pino/file.js
  • Date Modified: 02/28/2025 8:55 PM
  • File size: 358 bytes
  • MIME-type: text/plain
  • Charset: utf-8
'use strict'

const pino = require('./pino')
const { once } = require('node:events')

module.exports = async function (opts = {}) {
  const destOpts = Object.assign({}, opts, { dest: opts.destination || 1, sync: false })
  delete destOpts.destination
  const destination = pino.destination(destOpts)
  await once(destination, 'ready')
  return destination
}