log4net
如何使用:
下载包 log4net和microsoft.extensions.logging.log4net.aspnetcore\6.0.0\
在Program.cs中增加一行代码引入:builder.Logging.AddLog4Net("log4net.config");
配置log4.net.config
使用效果
(1)控制台输出花花绿绿的样子还是挺好看的。
(2)打开输出的日志文件也可以看看,效果不错哦!
System.NotImplementedException: 错误
at BeardCore.WebApi.Controllers.WeatherForecastController.Get() in D:\gdhu\mydev\cs\BeardCore\NETVersion\BeardCore.WebApi\Controllers\WeatherForecastController.cs:line 33
初稿
2021-12-13
