😎 .NET 框架 Furion v4.5.1 发布,贡献者破 220 人
.NET 要在国内真正发展起来,必须得有一些追逐梦想的人在做着不计付出的事情,而我希望自己能贡献一份微薄之力。
序言
经过两年多的迭代,Furion 框架已经相当成熟稳定,贡献者突破 220 人,但我们的团队并没有停止脚步,精益求精逐步将过去所有模块重新优化乃至重构。本次版本主要对日志功能,特别是控制台日志进行改进优化,支持更简易的方式配置模板、配置格式化,支持日志级别、日志类别、异常日记着色。
项目信息
- Gitee:https://gitee.com/dotnetchina/Furion
- Github:https://github.com/MonkSoul/Furion
- 文档:https://dotnetchina.gitee.io/furion
本期亮点
1. 控制台日志支持更简易方式自定义模板
services.AddConsoleFormatter(options =>
{
options.MessageFormat = (logMsg) =>
{
var stringBuilder = new StringBuilder();
stringBuilder.Append(DateTime.Now.ToString("o"));
// 其他的。。。自己组装
return stringBuilder.ToString();
};
});
2. 控制台/文件日志支持自定义日志日期格式
services.AddConsoleFormatter(options =>
{
options.DateFormat = "yyyy-MM-dd hh🇲🇲ss(zzz) dddd";
});
3. 控制台日志支持颜色高亮
info: 2022-09-28 02:02:20(+08:00) 星期三 System.Logging.EventBusService[0] #1
EventBus Hosted Service is running.
info: 2022-09-28 02:02:22(+08:00) 星期三 Microsoft.Hosting.Lifetime[14] #1
Now listening on: https://localhost:5001
info: 2022-09-28 02:02:22(+08:00) 星期三 Microsoft.Hosting.Lifetime[14] #1
Now listening on: http://localhost:5000
info: 2022-09-28 02:02:22(+08:00) 星期三 Microsoft.Hosting.Lifetime[0] #1
Application started. Press Ctrl+C to shut down.
info: 2022-09-28 02:02:22(+08:00) 星期三 Microsoft.Hosting.Lifetime[0] #1
Hosting environment: Development
info: 2022-09-28 02:02:22(+08:00) 星期三 Microsoft.Hosting.Lifetime[0] #1
Content root path: D:\Workplaces\OpenSources\Furion\samples\Furion.Web.Entry\
fail: 2022-09-28 02:02:40(+08:00) 星期三 Furion.Application.TestLoggerServices[0] #22
测试日志异常
++++++++++++++++++++++++++++++++++++++++++++++++++++++++
System.Exception: 错误啦
++++++++++++++++++++++++++++++++++++++++++++++++++++++++
本期更新
v4.5.1版本细节:https://gitee.com/dotnetchina/Furion/issues/I5TLI6 2022.09.28v4.5.0版本细节:https://gitee.com/dotnetchina/Furion/issues/I5TD4X 2022.09.27v4.4.9版本细节:https://gitee.com/dotnetchina/Furion/issues/I5SP37 2022.09.25
新特性
突破性变化
- [调整]
.Inject()支持配置更多参数,开放底层更多权限 1182283
- [调整]
问题修复
其他更改
文档
- [更新] 日志记录文档



