You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Serilog
Hi,
What is the best approach to access the LogEvent data within Emit method when creating a new sink? For example, if i need to process the LogEvent and write it to a number of database columns of various datatypes not just strings, I currently get the values from the "Properties" collection, then cover string values to desired data types. The issue I see with this approach is that there is an unnecessary conversion from text to types needs to happen for every message being logged. Any suggestions?
Thanks,
Alan
nblum...@nblumhardt.com
unread,
Apr 3, 2017, 5:02:24 PM4/3/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Serilog
Hi Alan,
You'll find the `LogEventPropertyValue` objects from `Properties` can be cast down to `ScalarValue` and a few other related types. `ScalarValue.Value` is the data you're looking for.