Sign in
Sign up
Explore
Enterprise
Education
Search
Help
Terms of use
About Us
Explore
Enterprise
Education
Gitee Premium
Gitee AI
AI teammates
Sign in
Sign up
Fetch the repository succeeded.
Open Source
>
Web Development
>
Web Framework
&&
Donate
Please sign in before you donate.
Cancel
Sign in
Scan WeChat QR to Pay
Cancel
Complete
Prompt
Switch to Alipay.
OK
Cancel
Watch
Unwatch
Watching
Releases Only
Ignoring
9.9K
Star
14.5K
Fork
4.2K
GVP
dotNET China
/
Furion
Code
Issues
0
Pull Requests
0
Insights
Pipelines
Service
Quality Analysis
Jenkins for Gitee
Tencent CloudBase
Tencent Cloud Serverless
悬镜安全
Aliyun SAE
Codeblitz
SBOM
DevLens
Don’t show this again
Update failed. Please try again later!
Remove this flag
Content Risk Flag
This task is identified by
as the content contains sensitive information such as code security bugs, privacy leaks, etc., so it is only accessible to contributors of this repository.
📝 发布 Furion v4.7.0 版本
Done
#I5Y04N
百小僧
owner
Opened this issue
2022-10-27 13:28
### 功能描述 发布 `Furion` 和 `Furion.Tools` 和 `Furion.Xunit` `v4.7.0` 版本 包含以下功能更新: ### 功能清单 - [x] 新增 日志模块时间格式化默认输出 `毫秒` 部分,针对并发比较高的场景 <sup>4.7.0</sup> [c0dc36c](https://gitee.com/dotnetchina/Furion/commit/c0dc36c4a2294596cbf3f5cdbdb2589c447bf746) - [x] 新增 写入数据库日志死循环输出检测机制 <sup>4.7.0</sup> [30dea0c](https://gitee.com/dotnetchina/Furion/commit/30dea0cebf8a946bea670fa0d2f82cde8321b847) - [x] 修复 **在 `IDatabaseLoggingWriter` 实现类中输出日志导致死循环问题** <sup>4.7.0</sup> [30dea0c](https://gitee.com/dotnetchina/Furion/commit/30dea0cebf8a946bea670fa0d2f82cde8321b847) - [x] 修复 **生成 `JWT Token` 时间戳和自动刷新逻辑在高并发下检查有效性不够精确问题,原因是时间戳丢掉了毫秒部分** <sup>4.7.0</sup> [3c0c017](https://gitee.com/dotnetchina/Furion/commit/3c0c017ca43c9043bb5806b2951a5bcc7d571142) - [x] 更新 `JSON Schema` 文件 [74bee56](https://gitee.com/dotnetchina/Furion/commit/74bee56ce2a6d305c3825d72e42f6dcaff102aaf) - [x] 更新 `SqlSugarCore` 拓展和脚手架至 `5.1.3.29` 版本 - [x] 发布 `v4.7.0` 版本文档 - [x] 更新示例项目 `samples` 依赖至 `v4.7.0` 版本 - [x] [Replit](https://replit.com/) 网站 `Furion` 案例同步到 `v4.7.0` 版本 - [x] `Gitee` 和 `Github` 发布 `Release-v4.7.0` 版本 - [x] 同步更新日志 ### 代码实现 [https://gitee.com/dotnetchina/Furion/pulls/635](https://gitee.com/dotnetchina/Furion/pulls/635) [https://gitee.com/dotnetchina/Furion/commit/74bee56ce2a6d305c3825d72e42f6dcaff102aaf](https://gitee.com/dotnetchina/Furion/commit/74bee56ce2a6d305c3825d72e42f6dcaff102aaf) [https://gitee.com/dotnetchina/Furion/commit/c0dc36c4a2294596cbf3f5cdbdb2589c447bf746](https://gitee.com/dotnetchina/Furion/commit/c0dc36c4a2294596cbf3f5cdbdb2589c447bf746) [https://gitee.com/dotnetchina/Furion/commit/30dea0cebf8a946bea670fa0d2f82cde8321b847](https://gitee.com/dotnetchina/Furion/commit/30dea0cebf8a946bea670fa0d2f82cde8321b847) [https://gitee.com/dotnetchina/Furion/commit/3c0c017ca43c9043bb5806b2951a5bcc7d571142](https://gitee.com/dotnetchina/Furion/commit/3c0c017ca43c9043bb5806b2951a5bcc7d571142) ### 文档更新 1. **关闭远程请求 `Http` 请求日志** 在 `Furion` 框架底层中,`HttpClient` 对象默认通过 `IHttpClientFactory` 创建的,只要发送请求就会自动打印日志,如: ```bash showLineNumbers {13-22} info: 2022-10-26 11:38:16(+08:00) 星期三 L System.Logging.EventBusService[0] #1 EventBus Hosted Service is running. info: 2022-10-26 11:38:17(+08:00) 星期三 L Microsoft.Hosting.Lifetime[14] #1 Now listening on: https://localhost:5001 info: 2022-10-26 11:38:17(+08:00) 星期三 L Microsoft.Hosting.Lifetime[14] #1 Now listening on: http://localhost:5000 info: 2022-10-26 11:38:17(+08:00) 星期三 L Microsoft.Hosting.Lifetime[0] #1 Application started. Press Ctrl+C to shut down. info: 2022-10-26 11:38:17(+08:00) 星期三 L Microsoft.Hosting.Lifetime[0] #1 Hosting environment: Development info: 2022-10-26 11:38:17(+08:00) 星期三 L Microsoft.Hosting.Lifetime[0] #1 Content root path: D:\Workplaces\OpenSources\Furion\samples\Furion.Web.Entry\ info: 2022-10-26 11:39:00(+08:00) 星期三 L System.Net.Http.HttpClient.Default.LogicalHandler[100] #8 Start processing HTTP request GET https://www.baidu.com/ info: 2022-10-26 11:39:00(+08:00) 星期三 L System.Net.Http.HttpClient.Default.ClientHandler[100] #8 Sending HTTP request GET https://www.baidu.com/ info: 2022-10-26 11:39:00(+08:00) 星期三 L System.Net.Http.HttpClient.Default.ClientHandler[101] #6 Received HTTP response headers after 288.0665ms - 200 info: 2022-10-26 11:39:00(+08:00) 星期三 L System.Net.Http.HttpClient.Default.LogicalHandler[101] #6 End processing HTTP request after 326.1497ms - 200 info: 2022-10-26 11:39:04(+08:00) 星期三 L System.Net.Http.HttpClient.Default.LogicalHandler[100] #3 Start processing HTTP request GET https://www.baidu.com/ ``` 如需关闭只需在 `appsettings.json` 和 `appsettings.Development.json` 中添加 `System.Net.Http.HttpClient` 日志类别过滤即可,如: ```json showLineNumbers {2,7} { "Logging": { "LogLevel": { "Default": "Information", "Microsoft.AspNetCore": "Warning", "Microsoft.EntityFrameworkCore": "Information", "System.Net.Http.HttpClient": "Warning" } } } ``` ----- 2. **关闭 `.NET Core` 底层的日志** 默认情况下,`.NET Core` 底层默认输出了很多日志,如需关闭只需在 `appsettings.json` 和 `appsettings.Development.json` 中添加 `"命名空间/日志类别":"最低日志级别"` 日志类别过滤即可,如: ```json showLineNumbers {2,7-8} { "Logging": { "LogLevel": { "Default": "Information", "Microsoft.AspNetCore": "Warning", "Microsoft.EntityFrameworkCore": "Information", "System.Net.Http.HttpClient": "Warning", "命名空间/日志类别": "Warning" } } } ``` 小提醒:过滤 `.NET Core` 底层日志最低日志级别通常设置为 `Warning`。 ----- 3. **关于数据库日志循环输出日志** 微软提供的 `EFCore` 或者第三方 `ORM` 本身操作数据库时自带日志输出,这就会导致 `IDatabaseLoggingWriter` 的 `Write` 死循环,解决这个问题有以下方法: 1. 创建新的数据库操作实例并关闭日志 2. 更新到 `Furion 4.7.0+` 版本 **(推荐)** 3. 自行根据业务逻辑过滤 **如不存在该问题可关闭框架自带死循环检测功能(对性能有提升作用)**: ```cs showLineNumbers {3} services.AddDatabaseLogging<DatabaseLoggingWriter>(options => { options.IgnoreReferenceLoop = false; }); ```
### 功能描述 发布 `Furion` 和 `Furion.Tools` 和 `Furion.Xunit` `v4.7.0` 版本 包含以下功能更新: ### 功能清单 - [x] 新增 日志模块时间格式化默认输出 `毫秒` 部分,针对并发比较高的场景 <sup>4.7.0</sup> [c0dc36c](https://gitee.com/dotnetchina/Furion/commit/c0dc36c4a2294596cbf3f5cdbdb2589c447bf746) - [x] 新增 写入数据库日志死循环输出检测机制 <sup>4.7.0</sup> [30dea0c](https://gitee.com/dotnetchina/Furion/commit/30dea0cebf8a946bea670fa0d2f82cde8321b847) - [x] 修复 **在 `IDatabaseLoggingWriter` 实现类中输出日志导致死循环问题** <sup>4.7.0</sup> [30dea0c](https://gitee.com/dotnetchina/Furion/commit/30dea0cebf8a946bea670fa0d2f82cde8321b847) - [x] 修复 **生成 `JWT Token` 时间戳和自动刷新逻辑在高并发下检查有效性不够精确问题,原因是时间戳丢掉了毫秒部分** <sup>4.7.0</sup> [3c0c017](https://gitee.com/dotnetchina/Furion/commit/3c0c017ca43c9043bb5806b2951a5bcc7d571142) - [x] 更新 `JSON Schema` 文件 [74bee56](https://gitee.com/dotnetchina/Furion/commit/74bee56ce2a6d305c3825d72e42f6dcaff102aaf) - [x] 更新 `SqlSugarCore` 拓展和脚手架至 `5.1.3.29` 版本 - [x] 发布 `v4.7.0` 版本文档 - [x] 更新示例项目 `samples` 依赖至 `v4.7.0` 版本 - [x] [Replit](https://replit.com/) 网站 `Furion` 案例同步到 `v4.7.0` 版本 - [x] `Gitee` 和 `Github` 发布 `Release-v4.7.0` 版本 - [x] 同步更新日志 ### 代码实现 [https://gitee.com/dotnetchina/Furion/pulls/635](https://gitee.com/dotnetchina/Furion/pulls/635) [https://gitee.com/dotnetchina/Furion/commit/74bee56ce2a6d305c3825d72e42f6dcaff102aaf](https://gitee.com/dotnetchina/Furion/commit/74bee56ce2a6d305c3825d72e42f6dcaff102aaf) [https://gitee.com/dotnetchina/Furion/commit/c0dc36c4a2294596cbf3f5cdbdb2589c447bf746](https://gitee.com/dotnetchina/Furion/commit/c0dc36c4a2294596cbf3f5cdbdb2589c447bf746) [https://gitee.com/dotnetchina/Furion/commit/30dea0cebf8a946bea670fa0d2f82cde8321b847](https://gitee.com/dotnetchina/Furion/commit/30dea0cebf8a946bea670fa0d2f82cde8321b847) [https://gitee.com/dotnetchina/Furion/commit/3c0c017ca43c9043bb5806b2951a5bcc7d571142](https://gitee.com/dotnetchina/Furion/commit/3c0c017ca43c9043bb5806b2951a5bcc7d571142) ### 文档更新 1. **关闭远程请求 `Http` 请求日志** 在 `Furion` 框架底层中,`HttpClient` 对象默认通过 `IHttpClientFactory` 创建的,只要发送请求就会自动打印日志,如: ```bash showLineNumbers {13-22} info: 2022-10-26 11:38:16(+08:00) 星期三 L System.Logging.EventBusService[0] #1 EventBus Hosted Service is running. info: 2022-10-26 11:38:17(+08:00) 星期三 L Microsoft.Hosting.Lifetime[14] #1 Now listening on: https://localhost:5001 info: 2022-10-26 11:38:17(+08:00) 星期三 L Microsoft.Hosting.Lifetime[14] #1 Now listening on: http://localhost:5000 info: 2022-10-26 11:38:17(+08:00) 星期三 L Microsoft.Hosting.Lifetime[0] #1 Application started. Press Ctrl+C to shut down. info: 2022-10-26 11:38:17(+08:00) 星期三 L Microsoft.Hosting.Lifetime[0] #1 Hosting environment: Development info: 2022-10-26 11:38:17(+08:00) 星期三 L Microsoft.Hosting.Lifetime[0] #1 Content root path: D:\Workplaces\OpenSources\Furion\samples\Furion.Web.Entry\ info: 2022-10-26 11:39:00(+08:00) 星期三 L System.Net.Http.HttpClient.Default.LogicalHandler[100] #8 Start processing HTTP request GET https://www.baidu.com/ info: 2022-10-26 11:39:00(+08:00) 星期三 L System.Net.Http.HttpClient.Default.ClientHandler[100] #8 Sending HTTP request GET https://www.baidu.com/ info: 2022-10-26 11:39:00(+08:00) 星期三 L System.Net.Http.HttpClient.Default.ClientHandler[101] #6 Received HTTP response headers after 288.0665ms - 200 info: 2022-10-26 11:39:00(+08:00) 星期三 L System.Net.Http.HttpClient.Default.LogicalHandler[101] #6 End processing HTTP request after 326.1497ms - 200 info: 2022-10-26 11:39:04(+08:00) 星期三 L System.Net.Http.HttpClient.Default.LogicalHandler[100] #3 Start processing HTTP request GET https://www.baidu.com/ ``` 如需关闭只需在 `appsettings.json` 和 `appsettings.Development.json` 中添加 `System.Net.Http.HttpClient` 日志类别过滤即可,如: ```json showLineNumbers {2,7} { "Logging": { "LogLevel": { "Default": "Information", "Microsoft.AspNetCore": "Warning", "Microsoft.EntityFrameworkCore": "Information", "System.Net.Http.HttpClient": "Warning" } } } ``` ----- 2. **关闭 `.NET Core` 底层的日志** 默认情况下,`.NET Core` 底层默认输出了很多日志,如需关闭只需在 `appsettings.json` 和 `appsettings.Development.json` 中添加 `"命名空间/日志类别":"最低日志级别"` 日志类别过滤即可,如: ```json showLineNumbers {2,7-8} { "Logging": { "LogLevel": { "Default": "Information", "Microsoft.AspNetCore": "Warning", "Microsoft.EntityFrameworkCore": "Information", "System.Net.Http.HttpClient": "Warning", "命名空间/日志类别": "Warning" } } } ``` 小提醒:过滤 `.NET Core` 底层日志最低日志级别通常设置为 `Warning`。 ----- 3. **关于数据库日志循环输出日志** 微软提供的 `EFCore` 或者第三方 `ORM` 本身操作数据库时自带日志输出,这就会导致 `IDatabaseLoggingWriter` 的 `Write` 死循环,解决这个问题有以下方法: 1. 创建新的数据库操作实例并关闭日志 2. 更新到 `Furion 4.7.0+` 版本 **(推荐)** 3. 自行根据业务逻辑过滤 **如不存在该问题可关闭框架自带死循环检测功能(对性能有提升作用)**: ```cs showLineNumbers {3} services.AddDatabaseLogging<DatabaseLoggingWriter>(options => { options.IgnoreReferenceLoop = false; }); ```
Comments (
3
)
Sign in
to comment
Status
Done
Backlog
Doing
Done
Closed
Assignees
Not set
百小僧
monksoul
Assignee
Collaborator
+Assign
+Mention
Labels
优化
建议
新功能
漏洞
Not set
Label settings
Milestones
v4.7.0
No related milestones
Pull Requests
None yet
None yet
Successfully merging a pull request will close this issue.
Branches
No related branch
Branches (
-
)
Tags (
-
)
Planed to start   -   Planed to end
-
Top level
Not Top
Top Level: High
Top Level: Medium
Top Level: Low
Priority
Not specified
Serious
Main
Secondary
Unimportant
参与者(1)
C#
1
https://gitee.com/dotnetchina/Furion.git
git@gitee.com:dotnetchina/Furion.git
dotnetchina
Furion
Furion
Going to Help Center
Search
Git 命令在线学习
如何在 Gitee 导入 GitHub 仓库
Git 仓库基础操作
企业版和社区版功能对比
SSH 公钥设置
如何处理代码冲突
仓库体积过大,如何减小?
如何找回被删除的仓库数据
Gitee 产品配额说明
GitHub仓库快速导入Gitee及同步更新
什么是 Release(发行版)
将 PHP 项目自动发布到 packagist.org
Repository Report
Back to the top
Login prompt
This operation requires login to the code cloud account. Please log in before operating.
Go to login
No account. Register