#2162·winston

[Bug]: default metadata is not added on log message of profiler

Author: geertendoornenbalCreated Jul 12, 2022Updated Jul 7, 2026
LabelsNeeds InvestigationBug

Search Terms

metadata profiler

The problem

When logging a message with the profiler, the default meta data of the logger instance is not added to the log message.

It is calling this.logger.write() directly, and it should have the added default metadata as well.

I worked around it by adding the defaultMeta myself: profiler.done({ message: "Finished complete request", ...logger.defaultMeta });

What version of Winston presents the issue?

v3.8.1

What version of Node are you using?

v16.16.0

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

No response

Minimum Working Example

No response

Additional information

No response