[ Web Proxy ]
URL:
Viewing: https://github-redirect.dependabot.com/log4js-node/log4js-node/pull/1332 [Back]  [Original]

fix(LoggingEvent): serde for `NaN`, `Infinity`, `-Infinity`, `undefined` by lamweili Pull Request #1332 log4js-node/log4js-node GitHub
Skip to content

Navigation Menu

Repository navigation

More items

fix(LoggingEvent): serde for NaN, Infinity, -Infinity, undefined - #1332

Merged
lamweili merged 3 commits into
masterfrom
fix/serde
Oct 1, 2022
Merged

lamweili merged 3 commits into
masterfrom
fix/serde

Conversation

@lamweili [@lamweili]

Copy link
Copy Markdown
Contributor

Fixes #1187

Supersedes PR #1188

Affected Components

Only affects clustering, multiprocessAppender, and tcpAppender.
These three will serialise() to String to transmit for the receiver to deserialise().

Code Object
(Input)
Serialised
(Transmission)
Deserialised
(Output)
Match
{"a": Number("abc")} {"a": NaN} {"a": "__LOG4JS_NaN__"} {"a": NaN}
{"b": 1/0} {"b": Infinity} {"b": "__LOG4JS_Infinity__"} {"b": Infinity}
{"c": -1/0} {"c": -Infinity} {"c": "__LOG4JS_-Infinity__"} {"c": -Infinity}
[undefined] [undefined] ["__LOG4JS_undefined__"] [undefined]

Compared to PR #1188, now the output matches exactly the input.

[Go]
This file contains hidden or 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

1 participant

Footer

© 2026 GitHub, Inc.

Web Proxy Viewer  |  New URL  |  Original Page