-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(winston): fix unhandledRejection handling for [email protected] chan…
…ges; release @elastic/[email protected] (#181) In [email protected], the handling of unhandledRejection events changed slightly: setting '<record>.rejection=true` rather than `<record>.exception`.
- Loading branch information
Showing
4 changed files
with
22 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,12 @@ | ||
# @elastic/ecs-winston-format Changelog | ||
|
||
## v1.5.3 | ||
|
||
- Fix format handling for the log record emitted by Winston for | ||
`unhandledRejection` events (when configured to handle them) as of | ||
[email protected]. In that version the log record changed slightly to | ||
set `record.rejection` rather than `record.exception`. | ||
|
||
## v1.5.2 | ||
|
||
- Fix the Winston transformers to *not* delete the `level` property from the | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -112,7 +112,13 @@ if (!TEST_SKIP_SLOW) { | |
t.equal(rec.error.message, 'funcb boom', 'error.message') | ||
t.match(rec.error.stack_trace, /^Error: funcb boom\n {4}at/, 'error.stack_trace') | ||
t.equal(rec.error.code, 42, 'error.code') | ||
t.equal(rec.exception, true, 'exception') | ||
if (semver.gte(winston.version, '3.12.0')) { | ||
// https://github.com/winstonjs/winston/pull/2390 changed behaviour | ||
// with unhandledRejection in [email protected]. | ||
t.equal(rec.rejection, true, 'rejection') | ||
} else { | ||
t.equal(rec.exception, true, 'exception') | ||
} | ||
t.end() | ||
} | ||
) | ||
|