How can I inject methodname into ILogger.Debug()-call without changing useage everywhere?
Hi,
I have some property I wish to inject into my log messages (Serilog). I found a way to obtain it, but it requires a new method:
The idea here is that I can enrich the log template with the method name of the callsite. But this isn't the same Debug method found in the ILogger interface - so I'll have to use this method instead of that one. Is there a better way to achieve the same without using this method (since I'll have to add a
using
statement to use it)?1 Reply
Anybody got any suggestions for this?