Files
klz-cables.com/.pnpm-store/v10/files/be/5089d80bf24a8da2879afa88b1924675665d3ba70addc8a68879e38cb418cf74060a84419985304fefe6a63835ad0a443e031e27d833c3a36213e9d0d9beef
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

69 lines
1.5 KiB
Plaintext

'use strict'
const pino = require('..')
const { tmpdir } = require('node:os')
const { join } = require('node:path')
const file = join(tmpdir(), `pino-${process.pid}-example`)
const transport = pino.transport({
targets: [{
level: 'warn',
target: 'pino/file',
options: {
destination: file
}
/*
}, {
level: 'info',
target: 'pino-elasticsearch',
options: {
node: 'http://localhost:9200'
}
*/
}, {
level: 'info',
target: 'pino-pretty'
}]
})
const logger = pino(transport)
logger.info({
file
}, 'logging destination')
logger.info('hello world')
logger.error('this is at error level')
logger.info('the answer is %d', 42)
logger.info({ obj: 42 }, 'hello world')
logger.info({ obj: 42, b: 2 }, 'hello world')
logger.info({ nested: { obj: 42 } }, 'nested')
logger.warn('WARNING!')
setImmediate(() => {
logger.info('after setImmediate')
})
logger.error(new Error('an error'))
const child = logger.child({ a: 'property' })
child.info('hello child!')
const childsChild = child.child({ another: 'property' })
childsChild.info('hello baby..')
logger.debug('this should be mute')
logger.level = 'trace'
logger.debug('this is a debug statement')
logger.child({ another: 'property' }).debug('this is a debug statement via child')
logger.trace('this is a trace statement')
logger.debug('this is a "debug" statement with "')
logger.info(new Error('kaboom'))
logger.info(null)
logger.info(new Error('kaboom'), 'with', 'a', 'message')