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

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

Open
iRoachie opened this issue Nov 25, 2024 · 2 comments
Open

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

iRoachie opened this issue Nov 25, 2024 · 2 comments

Comments

@iRoachie
Copy link

🔎 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

@2013xile
Copy link

2013xile commented Dec 3, 2024

It may helpful #2467

@HenriqueSilverio
Copy link

HenriqueSilverio commented Dec 22, 2024

Why do we have winston/logger.js#L63 and winston/logger.js#L271-L273, if when I run iRoachie's 'Minimum Working Example' above, it takes me to logform/errors.js#L15? How can I exercise winston/logger.js#L63 and winston/logger.js#L271-L273?

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

No branches or pull requests

3 participants