Author : MD TAREQ HASSAN | Updated : 2020/12/11

Pre-requisites

Dependency injection in console app

Qucik Logging Without DI

using Microsoft.Extensions.Logging;

namespace ConsoleApp.Logging
{
    public class Foo
    {
        public static void Xxx()
        {
            ILogger logger = new LoggerFactory().CreateLogger<Functions>();

            logger.LogInformation("Foo Bar Baz");
        }
    }
}

Logging With DI

Using Serilog