Skip to content

An include option does not filter nested keys #645

@marcinrogacki

Description

@marcinrogacki

Hi, I've notice that include option (-I) stops working when trying to filter by 2nd+ nested keys.

Version: 13.1.3

$ cat pino.log
{"level":20,"time":1772096544104,"pid":33,"hostname":"test","user":{"id":"1234","name":"Joe"},"request":{"ip":"127.0.0.1"},"msg":"User update"}
# Include shows nothing
$ cat pino.log | pino-pretty -I user.id
User update
# Ignore works as expected 
$ cat pino.log | pino-pretty -i user.id
[10:02:24.104] DEBUG (33 on test): User update
    user: {
      "name": "Joe"
    }
    request: {
      "ip": "127.0.0.1"
    }
# Include works fine on 1st level key
$ cat pino.log | pino-pretty -I user
User update
    user: {
      "id": "1234",
      "name": "Joe"
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions