pada57 / serilog-sinks-influxdb

Serilog Sinks for InfluxDB
MIT License
10 stars 9 forks source link

Added parameter to include the full exception details (including stack trace) #14

Closed jildertvenema closed 2 years ago

jildertvenema commented 3 years ago

We use this nuget package to write logs to influxDB but we needed to include the stack trace. Can this be an update for this package? What do you think?

pada57 commented 3 years ago

Thanks first for your PR very appreciated to see project is used by real people 🙂

I didn't add on purpose the exception as separate field as there are a limited number of fields allowed in syslog format. Another reason I didn't add is exception is usually log as log.Error(ex.tostring ()).

We could log exception as separate field but be aware not following strict syslog format. Then we should strip special characters that will not work via the influxapi.

jildertvenema commented 3 years ago

Ah we use influxdb with grafana and we use a custom message for most of the error logs like: log.Error(ex, "File not found").

what do you mean with stripping special characters?

pada57 commented 2 years ago

hello i will merge your PR but i will put in final release default param to false as i did for new version for 1.4 cheers @jildertvenema