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

Add support for dot notation when accessing custom keys #438

Open
dror-weiss opened this issue Jul 18, 2023 · 3 comments
Open

Add support for dot notation when accessing custom keys #438

dror-weiss opened this issue Jul 18, 2023 · 3 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@dror-weiss
Copy link

Hello,

In Pino, I'm using its nestedKey feature with a custom time field that I want Pino-Pretty will parse. However, the --timestampKey supports only fields in the root of the log entry.

I would like to provide --timestampKey nested_key.time to be used as the time value.

This is also relevant to all custom keys the library allows to override.

@mcollina
Copy link
Member

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

@OlivierCuyp
Copy link

OlivierCuyp commented Oct 24, 2024

Since this related, pino-pretty doen't handle well error display when using nestedKey on pino.
Either pino-pertty allow dot notation for timestampKey& errorLikeObjectKeys or pino-pretty need to have a nestedKey option like pino.

@mcollina let us know which solution is preferred

@mcollina
Copy link
Member

pino-pretty should have a nestedKey option too!

@mcollina mcollina added good first issue Good for newcomers enhancement New feature or request labels Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants