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

Reusing a reserved property name such as msg leads to an incorrect json output. #86

Open
zah opened this issue Aug 7, 2020 · 0 comments

Comments

@zah
Copy link
Contributor

zah commented Aug 7, 2020

Possible resolutions:

  1. Outlaw the use of reserved properties (i.e. produce a compile-time error when they are used)
  2. Choose new names for the reserved properties that are less likely to collide with user code (e.g. $msg, $lvl, etc)
  3. Nest all user properties in a dedicated sub-field of the record.

The most likely initial resolution will be option 1).

zah added a commit to vacp2p/nim-libp2p that referenced this issue Aug 7, 2020
Every Chronicles log record has an existing `msg` property matching
the static string supplied in the log statement. Thus, it's currently
not possible to use `msg` as the name of a user property:

status-im/nim-chronicles#86
dryajov pushed a commit to vacp2p/nim-libp2p that referenced this issue Aug 7, 2020
Every Chronicles log record has an existing `msg` property matching
the static string supplied in the log statement. Thus, it's currently
not possible to use `msg` as the name of a user property:

status-im/nim-chronicles#86
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant