Serilog ExpressionTemplate rename log level and apply formatting
I'm trying to use serilog's ExpressionTemplate and write the log level in the following way:
{ "level": "INF", ... }
I know how to alias @l to level - level: @l and I know how to format the level to three upper-case letters - @l:u3 but I'm unable to combine the two
I have tried the following without success (fails when trying to format the template with an exception):
level: @l:u3
{'level': @l:u3}
Comments
Post a Comment