Closed drusellers closed 1 year ago
Hey Dru! Message Aid sounds awesome, glad to hear you're building this - good luck with it!
On using Serilog Timings with MEL, I think someone set out to port this library over at one point 🤔 I can't put my hand on it right now, but it might be findable out there. I don't think there's a quick/easy way to achieve what you want otherwise.
If not, this library is not a lot of code - maybe porting across to use MEL's ILogger<T>
would give you a better long-term outcome?
Not a lot of time to dig in right now, unfortunately, but let me know if there are any details I can help to fill in.
@nblumhardt hey thanks man. I was able to port it over pretty quickly. At least the bits that I needed. I'll keep chewing on it while I use it in anger. :joy: once it feels pretty settled - I'll start a convo up about giving it back to the Serilog team and see where that goes. Cheers!
Great, thanks @drusellers 👍
When using the
with the default MEL
ILogger<T>
I of course don't have the Serilog logger. This means that I also lose the SourceContext that I can use to then filter log levels with.I respect that you aren't looking to add
TimeOperation
as an extension method in this library itself. But maybe it could be added toSerilog.Extensions.Hosting
which I assume doesn't have access to SerilogTimings so we get to have fun with all of the dependency mish-mash.Open to other alternatives as well. Also open to any blog posts you might have on why people should just use the Serilog Logger in their applications. and leave MEL for framework builders.