Dmitry A
Dmitry A

Reputation: 21

Serilog: saving event properties added with ForContext into flat files

I am new to Serilog and would like to clarify saving of custom event properties added with ForContext along with flat files

ForContext adds properties to events, so events can be filtered for writing into different sinks (files), and this works great.

Is there way to write all custom properties of event into RollingFile without modification of outputTemplate?

Potentially we can have a number of different properties and do not want to edit string template each time when add/remove some property.

Upvotes: 2

Views: 547

Answers (1)

Nicholas Blumhardt
Nicholas Blumhardt

Reputation: 31842

This is an omission Serilog's output formatting currently. Your input on the proposal at: https://github.com/serilog/serilog/issues/825 would be welcome and appreciated.

Upvotes: 1

Related Questions