Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

colorizeObjects option is not colorizing objects #537

Open
alexbatis opened this issue Nov 2, 2024 · 1 comment
Open

colorizeObjects option is not colorizing objects #537

alexbatis opened this issue Nov 2, 2024 · 1 comment

Comments

@alexbatis
Copy link

setting colorizeObjects: true seems to have no effect on output

using code from the basic example

pino version: 9.5.0
pino-pretty version: 11.3.0

'use strict'

var pino = require('pino')()

pino.info('hello world')
pino.error('this is at error level')
pino.info('the answer is %d', 42)
pino.info({ obj: 42 }, 'hello world')
pino.info({ obj: 42, b: 2 }, 'hello world')
pino.info({ nested: { obj: 42 } }, 'nested')
setImmediate(function () {
  pino.info('after setImmediate')
})
pino.error(new Error('an error'))

var child = pino.child({ a: 'property' })
child.info('hello child!')

var childsChild = child.child({ another: 'property' })
childsChild.info('hello baby..')

pino.debug('this should be mute')

pino.level = 'trace'

pino.debug('this is a debug statement')

pino.child({ another: 'property' }).debug('this is a debug statement via child')
pino.trace('this is a trace statement')

pino.debug('this is a "debug" statement with "')

output (colorizeObjects not specificied):
control

output (--colorizeObjects):
Screenshot 2024-11-01 at 7 54 10 PM

@mcollina
Copy link
Member

mcollina commented Nov 6, 2024

Thanks for reporting! Would you like to send a Pull Request to address this issue? Remember to add unit tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants