Answers for "difference between all logging framework .NET Core?"

C#
0

difference between all logging framework .NET Core?

using NLog;
using System;

namespace LoggingDemo.Nlog
{
    class Program
    {
        static void Main(string[] args)
        {
            LogManager.LoadConfiguration("nlog.config");
            var log = LogManager.GetCurrentClassLogger();
            log.Debug("Starting up");
            log.Debug("Shutting down");
            Console.ReadLine();
        }
    }
}
Posted by: Guest on May-04-2022
0

difference between all logging framework .NET Core?

<?xml version="1.0" encoding="utf-8" ?>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

 <targets>
   <target name="logfile" xsi:type="File" fileName="logfile.txt" />
   <target name="logconsole" xsi:type="Console" />
 </targets>

 <rules>
   <logger name="*" minlevel="Debug" writeTo="logconsole" />
   <logger name="*" minlevel="Debug" writeTo="logfile" />
 </rules>
</nlog>
Posted by: Guest on May-04-2022

Code answers related to "difference between all logging framework .NET Core?"

C# Answers by Framework

Browse Popular Code Answers by Language