Microsoft.Extensions.Logging.Log4Net.AspNetCore 2.1.0

Allows to configure Log4net as Microsoft Extensions Logging handler on any ASP.NET Core application. Original code proposal by @anuraj --> https://dotnetthoughts.net/how-to-use-log4net-with-aspnetcore-for-logging/

No packages depend on Microsoft.Extensions.Logging.Log4Net.AspNetCore.

Fixed bugs:

  • #15 - Invalid exception logging Now, the exception formatter has been removed, and included the exception to be considered by Log4Net Exception pattern layout.
  • #16 - ArgumentNullException when running with TestHost @twenzel have implemented the required change to get the executing assembly from the startup class.
  • #20 - Not compatible with new WebHostBuilder pattern @twenzel have implemented the required change to adapt the logging extensions to the new recommended logging configuration by Microsoft (ref: https://docs.microsoft.com/en-us/aspnet/core/fundamentals/logging/?tabs=aspnetcore2x#how-to-add-providers).

Special thanks to Toni Wenzel (@twenzel) by its contributions

.NET Core 1.1

.NET Framework 4.6.2

.NET Core 2.0

.NET Standard 2.0

Version Downloads Last updated
8.0.0 4 01/01/2026
7.0.0 2 01/04/2026
6.1.0 2 01/04/2026
6.0.0 2 01/04/2026
5.0.4 2 01/04/2026
5.0.3 2 01/04/2026
5.0.1 2 01/04/2026
5.0.0 2 01/04/2026
3.1.5 2 01/04/2026
3.1.3 2 01/04/2026
3.1.0 2 01/04/2026
3.0.3 2 01/04/2026
3.0.0 2 01/04/2026
2.2.12 2 01/04/2026
2.2.11 2 01/04/2026
2.2.10 2 01/04/2026
2.2.9 2 01/04/2026
2.2.8 2 01/04/2026
2.2.6 2 01/04/2026
2.2.5 2 01/04/2026
2.2.4 2 01/04/2026
2.2.3 2 01/04/2026
2.2.1 2 01/04/2026
2.2.0 2 01/04/2026
2.1.0 2 01/04/2026
2.0.3 2 01/04/2026
2.0.2 2 01/04/2026
2.0.1 2 01/04/2026
2.0.0 2 01/04/2026
1.1.0 2 01/04/2026
1.0.1 2 01/04/2026
1.0.0 2 01/04/2026