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/

There is a newer version of this package available.
See the version list below for details.
Install-Package Microsoft.Extensions.Logging.Log4Net.AspNetCore -Version 2.1.0
dotnet add package Microsoft.Extensions.Logging.Log4Net.AspNetCore --version 2.1.0
<PackageReference Include="Microsoft.Extensions.Logging.Log4Net.AspNetCore" Version="2.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Microsoft.Extensions.Logging.Log4Net.AspNetCore --version 2.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Release Notes

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

Version History

Version Downloads Last updated
2.2.11 19,094 5/10/2019
2.2.10 132,178 1/14/2019
2.2.9 4,654 1/7/2019
2.2.8 1,660 1/2/2019
2.2.6 78,675 10/22/2018
2.2.5 61,964 9/6/2018
2.2.4 61,069 7/11/2018
2.2.3 5,973 7/3/2018
2.2.1 9,141 6/26/2018
2.2.0 14,788 6/20/2018
2.1.0 52,406 4/17/2018
2.0.3 47,131 3/2/2018
2.0.2 2,262 2/27/2018
2.0.1 11,074 1/8/2018
2.0.0 1,640 1/2/2018
1.1.0 6,050 11/2/2017
1.0.1 2,525 9/21/2017
1.0.0 3,300 7/12/2017
Show less