Skip to content

Commit e0244e0

Browse files
author
Alexandra Tudor
committed
Feature - optionally include Error.cause property
1 parent c63a5ad commit e0244e0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/winston/logger.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@ class Logger extends Transform {
248248

249249
if (meta.message) info.message = `${info.message} ${meta.message}`;
250250
if (meta.stack) info.stack = meta.stack;
251+
if (meta.cause) info.cause = meta.cause;
251252

252253
this.write(info);
253254
return this;

0 commit comments

Comments
 (0)