NLog integration

If you have a .NET application which is already using NLog, you can configure it to save the logs to kisslog.net.

Install instructions:

HomeController.cs + NLog
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
using NLog;

namespace NLog_AspNet_MVC.Controllers
{
    public class HomeController : Controller
    {
        private readonly ILogger _logger;
        public HomeController()
        {
            _logger = LogManager.GetCurrentClassLogger();
        }

        public ActionResult Index()
        {
            _logger.Info("Hello world from NLog!");
            _logger.Trace("Trace message");
            _logger.Debug("Debug message");
            _logger.Info("Info message");
            _logger.Warn("Warning message");
            _logger.Error("Error message");
            _logger.Fatal("Fatal message");

            return View();
        }
    }
}
ASP.NET MVC + NLog