serilog / serilog-expressions

An embeddable mini-language for filtering, enriching, and formatting Serilog events, ideal for use with JSON or XML configuration.
Apache License 2.0
190 stars 17 forks source link

Make the `rest()` function aware of `@p.X` and `@p['X']` (breaking change) #108

Closed nblumhardt closed 5 months ago

nblumhardt commented 11 months ago

Fixes #107

The existing behavior was intended to allow @p.X to be an escape hatch so that the reference to X is invisible to rest(). This turns out to be confusing in actual use.

The new ways to hide a property reference from rest() are:

let p = @p in p.X

or

@p[concat('X', '')]

etc.

Major version bump because this is likely to affect a few templates in use.