Edi Wang

Azure Developer, Microsoft MVP


Use Environment Specific nlog.config in ASP.NET Core

ASP.NET Core has built-in aspsettings.env.json which can automatically apply to different environments. But how about NLog? In official examples, it only got one nlog.config file which will be used in all environments. Let's see how we can change it to use different config files on different environments. Why do we need this This requirement actually came from this blog system. My blog runs on …

.NET Core NLog

Use NLog in ASP.NET Core 2.0

There's official update for NLog targeting ASP.NET Core 2.x, for the latest methods please refer to https://github.com/NLog/NLog.Web/wiki/Getting-started-with-ASP.NET-Core-2 Recently I am porting a classic ASP.NET MVC 5 project to .NET Core 2.0, in order to run it on Linux. One of the parts that has differences between .NET Fx and .NET Core is logging. I choose NLog as my logging providor, let's …

.NET Core NLog

  • 1