Skip to content

Conversation

aradalvand
Copy link

@aradalvand aradalvand commented Aug 20, 2025

Fixes #132

In CompiledMessageToken.cs, beyond the special cases of null and string, for which the library does rendering that's different to that of Serilog's built-in ScalarValue.Render method (e.g. unquoted strings), we're delegating to the aforementioned method; which internally supports ICustomFormatters — see this. I don't suspect a breaking change; the new behavior with regards to the formatProvider argument is a strict subset of the new behavior. Meaning existing users' supplied formatProviders will continue to work as they were before.

I'm just not sure if the implementation is complete. Let me know if I've missed something.

Let me know if you approve of the approach, and if so, I could also add some tests for the feature.

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

Successfully merging this pull request may close these issues.

Add support for ICustomFormatter — the formatProvider option's behavior is inconsistent other sinks
1 participant