Skip to content

RoamingLost/Chimera.Extensions.Logging.Log4Net

Repository files navigation

.NET Core logging extension for log4net

Package: chimera.extensions.logging.log4net NuGet

log4net logger provider for Microsoft.Extensions.Logging. Compatible with ASP.NET Core and .NET Core official release (dotnet).

Routes .NET Core log messages to log4net. Refer to the wiki for more information.

How to use

  1. Add dependency in project.json

     "dependencies": {
        "chimera.extensions.logging.log4net": "1.1.1"
      }
  2. Create log4net.config in root of your project file, see log4net.config example

  3. In Startup.cs add in Configure

    using Chimera.Extensions.Logging.Log4Net;
    
    public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
    {
        //add log4net to .NET Core
        loggerFactory.AddLog4Net();

About

ASP.NET Core / .NET Core logging extension for log4net

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages