Apache.log4net.Extensions.Logging
log4net logger provider implementation for Microsoft.Extensions.Logging.
Install / Use
/learn @joshclark/Apache.log4net.Extensions.LoggingREADME
apache.log4net.Extensions.Logging

A log4net provider for Microsoft.Extensions.Logging, the logging subsystem used by ASP.NET Core.
This package routes ASP.NET log messages through log4net, so you can get information about ASP.NET's internal operations logged to the same log4net appenders as your application events.
Instructions
First, install the apache.log4net.Extensions.Logging NuGet package into your web or console app.
Install-Package apache.log4net.Extensions.Logging
(Note: You should use version 1.x for .NET Core 1.x projects and version 2.x for .NET Core 2.x projects because of breaking change in .NET Core logging API introduced in .NET Core 2.0)
Next, create a log4net.config in the root of your project, see log4net.config for examples. You can also use the config included with the sample app
Finally (.NET Core 1.x), in your Startup class's Configure() method, remove the existing logger configuration entries and
call AddLog4Net() on the provided loggerFactory.
public void Configure(IApplicationBuilder app,
IHostingEnvironment env,
ILoggerFactory loggerfactory,
IApplicationLifetime appLifetime)
{
loggerfactory.AddLog4Net();
Finally (.NET Core 2.x), in your Startup class's ConfigureServices() method, remove the existing logger configuration entries and
call AddLog4Net() on the ILoggerBuilder in AddLogging.
public IServiceProvider ConfigureServices(IServiceCollection services)
{
services.AddLogging(builder => builder.AddLog4Net());
Related Skills
node-connect
349.9kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
349.9kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
349.9kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
