Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const createLogger = (service: string, options: pino.LoggerOptions = {}) =>
options.browser !== undefined
? pino({ ...options, base: { service }, prettyPrint: getPretty() })
: pino(
{ ...options, base: { service }, prettyPrint: getPretty() },
process.env.NODE_ENV === 'production' ? pino.extreme(1) : pino.destination(1),
);