Skip to content

[Bug]: Error.cause still not being logged #2533

@iRoachie

Description

@iRoachie

🔎 Search Terms

error, cause

The problem

Error.cause is still not logged even after #2447.

Screenshot 2024-11-25 at 12 29 22 PM

What version of Winston presents the issue?

v3.17.0

What version of Node are you using?

v20.18.1

If this worked in a previous version of Winston, which was it?

No response

Minimum Working Example

const winston = require('winston');
const { format, transports } = winston;

const log = winston.createLogger({
  format: format.combine(format.errors({ cause: true }), format.json()),
  transports: [new transports.Console()],
});

log.error(new Error("I'm an error", { cause: new Error('with a cause') }));

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions