Alberto Alberto - 1 year ago 193
ASP.NET (C#) Question

NLog on ASP.NET MVC 4: NLog or NLog.Web

I'm new to NLog. Would you recommend to use NLog or NLog.Web for an ASP.NET MVC 4 project? I see that NLog.Web can be used for standard ASP.NET projects but not sure about MVC ones.


Answer Source

NLog assembly is good enough to start logging in your mvc app. You can log your messages to a log file. If you need database logging in your web app, you need 2 more assemblies

  1. NLog.Extended
  2. NLog.Web

NLog.Web is needed to get data from the HttpRequest. So one can say this is optional unless you really want the details from HttpRequest (why not) ?

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download