serilog-contrib / Serilog.Sinks.Logz.Io

Apache License 2.0
15 stars 11 forks source link

Possible to truncate string property message length? #27

Closed arisliang closed 5 months ago

arisliang commented 2 years ago

In case some string property is too long, is it possible to set a maximum length by property name?

mantasaudickas commented 2 years ago

Thanks for bringing this up, but I guess this is not very trivial as I guess not only property can be too long, but a final payload containing multiple long properties can also become too long.

arisliang commented 2 years ago

Yes, indeed. But as a start, if user know certain property could be pretty long (such as stacktrace), they can set maximum to truncate that property (or for any property), it would help to bring the whole payload down.