Skip to content

logger does not output the contents of property name #937

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

Closed
GeoffThorpeFT opened this issue Feb 15, 2024 · 2 comments
Closed

logger does not output the contents of property name #937

GeoffThorpeFT opened this issue Feb 15, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@GeoffThorpeFT
Copy link

Node.js version: 18
Impacted package(s): logger

Steps to reproduce

With the following code:

	console.log("@@@@@@@@@@@@@@@@@@@@@@@@@@@")
	console.log(app.id)
	console.log(app.name)
	console.log("@@@@@@@@@@@@@@@@@@@@@@@@@@@")
	logger.info({
		event: 'STARTING_APP_ANALYSIS',
		name: app.name,
		id: app.id,
		progress: count,
		target: apps.length,
	})

The console.log outputs the contents of app.name whereas the logger.info does not output the name property - just the id, progress and target. If I use a value different to name eg geoff then the contents of app.name is output

@GeoffThorpeFT GeoffThorpeFT added the bug Something isn't working label Feb 15, 2024
@rowanmanning
Copy link
Member

Confirmed with @GeoffThorpeFT that name gets moved when pino-pretty is enabled but it does appear in the JSON when you disable the prettifier. Might be that we can stop it from doing this.

@rowanmanning
Copy link
Member

This is similar to #1069, I think it's not solvable unfortunately. The data does appear in production so I'm not particularly worried about it.

@rowanmanning rowanmanning closed this as not planned Won't fix, can't repro, duplicate, stale Jul 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants