NLog EventProperties in .NET Core
问题 I'm using ILogger<MyController> to write logs using DI (see step 6) I'm also using NLog EventProperties I want to add traceId to all my logs in my controller automatically. This is working: logger.Info("Some log. TraceId:{traceId}", 123); However, then I need to change all my log commands (a lot of them!), which is a pain. If I do the following, it's not tread safe: using NLog; public class MyController : Controller { private static readonly Logger Logger = LogManager.GetCurrentClassLogger();