feat(logging): 添加异步日志输出器功能

- 使用 Channel 实现异步日志处理机制
- 解耦调用线程与慢速日志目标
- 添加全局 Channels 命名空间引用
- 完善日志组件的异步处理能力
This commit is contained in:
GeWuYou 2026-03-21 22:04:09 +08:00
parent d94d8deb29
commit cdc49c319a
3 changed files with 4 additions and 2 deletions

View File

@ -1,3 +1,4 @@
using GFramework.Core.Abstractions.Logging;
using GFramework.Core.Logging.Appenders;
namespace GFramework.Core.Tests.Logging;

View File

@ -15,4 +15,5 @@ global using System;
global using System.Collections.Generic;
global using System.Linq;
global using System.Threading;
global using System.Threading.Tasks;
global using System.Threading.Tasks;
global using System.Threading.Channels;

View File

@ -3,7 +3,7 @@ using GFramework.Core.Abstractions.Logging;
namespace GFramework.Core.Logging.Appenders;
/// <summary>
/// 异步日志输出器,使用 <see cref="Channel{T}" /> 将调用线程与慢速日志目标解耦。
/// 异步日志输出器,使用 <see cref="Channel" /> 将调用线程与慢速日志目标解耦。
/// </summary>
/// <remarks>
/// <para>