007.NET5 Log4Net组件使用

NET 5 Log4Net组件使用

1. Nuget引入程序集:log4net + Microsfot.Extensions.Logging.Log4Net.AspNetCore

 

 2. 准备配置文件

 

配置LogNet配置文件的读取

配置方法一

 

配置方法二

3.使用LogNet记录日志

 

原文地址:https://www.cnblogs.com/ljg3020/p/14323655.html