Skip to content

Display stacktrace when logging an error #69

Description

@daniel-ac-martin

Prerequisites

  • I have written a descriptive issue title
  • I have searched existing issues to ensure the feature has not already been requested

🚀 Feature Proposal

When an error is logged, the back-trace could be displayed alongside the error.
Although this would obviously break with the name of this library as it would require multiple lines to do so. (I'd argue it is a worthy exception though.)

Motivation

@fastify/one-line-logger is typically suggested for use in dev environments. In a dev environment it is very useful to be able to see the back-trace on an error, in order to debug the issue.

Example

Vanilla pino-pretty will do this currently, albeit in not so pretty a way.

Current @fastify/one-line-logger Vanilla pino-pretty
Image Image

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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