Skip to content

Double log on 500 error #365

@igorpost92

Description

@igorpost92

Hi.

I’ve noticed strange duplicates for requests resulting in 500 errors: one log with the ERROR level and one with the INFO level, containing the message "request errored."
This behavior seems to be related to this line of code:
https://github.com/pinojs/pino-http/blob/master/logger.js#L123

Сould you please let me know is this the intended behavior? If so, could you kindly let me know if it’s possible to disable it?
Thank you

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