I tried that out and it produced output without extra quotes.
Is the current behavior intentional, or would you accept a PR addressing this?
As an addendum--and I'm kind of new to both Serilog and Fluentd--I'd have expected the serializer to have synthesized an @l value too, a field that inlines the arguments into the message. In the example above, that would result in "Got Foo: Bar". Is that something that makes sense to support, or should some downstream piece of Fluentd handle that?
I get extra quotes in Fluentd if I write log statements with string properties:
...which results in this in the FluentD json logs (note the extra quotes in "Bar"):
I confirmed that this is the behavior of this line in
FluentSinkClient
:Because
log.Value.ToString()
produces a string that itself contains quotes.You can see a similar issue here: https://github.com/serilog/serilog/issues/936
The fix suggested there is the equivalent of:
I tried that out and it produced output without extra quotes.
Is the current behavior intentional, or would you accept a PR addressing this?
As an addendum--and I'm kind of new to both Serilog and Fluentd--I'd have expected the serializer to have synthesized an
@l
value too, a field that inlines the arguments into the message. In the example above, that would result in "Got Foo: Bar". Is that something that makes sense to support, or should some downstream piece of Fluentd handle that?