/log4net-netcore-example

Example using log4net in .NET Core Console Application

Primary LanguageC#MIT LicenseMIT

Using log4net in .NET Core Example

Overview

Example using log4net in .NET Core Console Application. See links below for examples used to put together this example. This example also illustrates using Dependency Injection so that this can be ported over to other .NET Core projects such as .NET Core Web Applications.

Primarily this example takes advantage of these NuGet packages

dotnet add package Microsoft.Extensions.Logging
dotnet add package Microsoft.Extensions.Logging.Log4Net.AspNetCore
dotnet add package Microsoft.Extensions.DependencyInjection

The output of the log file is placed in Log4NetInCoreExampleLogFile.log in the bin folder when you run the application

Links