-
Notifications
You must be signed in to change notification settings - Fork 129
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
Serilog console logging with JsonFromatter #225
Comments
Hi! To do this, install the Serilog.Formatting.Compact package, and use |
Hi, I didn't use RenderedCompactJson or CompactJsonFormatter because of following reason |
Hi! Just grabbing the source for |
I also would like to be able to use the JsonFormatter and set |
For those wondering, this is how you configure this after the 3.3.0 release: {
"Name": "File",
"Args": {
"path": "log.json",
"rollingInterval": "Day",
"retainedFileCountLimit": 7,
"formatter": {
"type": "Serilog.Formatting.Json.JsonFormatter, Serilog",
"renderMessage": true
}
}
} |
I have been trying to use Serilog Console logging with JsonFormatter. When I enable option for console logging in code with .NET core we have option with JsonFromatter to renderMessage= true in its constructor which helps to render message and template in a nicer way and working well.
When I try to define and make it work using appsetting.json configuration for console logging I dont see an option to define "renderMessage" = true due to which when it logs in console I am not getting rendered message.
"formatter": "Serilog.Formatting.Json.JsonFormatter, Serilog"
As part of configuration setting if you could let me know how to enable render message option will be of great help.
The text was updated successfully, but these errors were encountered: