GFramework/GFramework.Core/Logging/AppenderConfiguration.cs
GeWuYou e3652db030 fix/review-followups: 修复审查反馈并补充提交流程规则
- 修复 Core、Cqrs、Godot 与 Game 模块中的异常契约、空值校验和线程亲和性问题
- 更新 Settings API 为 ApplyAsync 并同步实现、调用点、测试与中文文档
- 补充 AGENTS.md 中的构建校验、自动提交与分支创建规则
- 整理 Logging、WeakCache 与 Resource 相关实现的行为与文档一致性
2026-04-18 19:37:25 +08:00

53 lines
1.4 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

namespace GFramework.Core.Logging;
/// <summary>
/// Appender 配置。
/// </summary>
public sealed class AppenderConfiguration
{
/// <summary>
/// Appender 类型Console, File, RollingFile, Async
/// </summary>
public string Type { get; set; } = string.Empty;
/// <summary>
/// 格式化器类型Default, Json
/// </summary>
public string Formatter { get; set; } = "Default";
/// <summary>
/// 文件路径(仅用于 File 和 RollingFile
/// </summary>
public string? FilePath { get; set; }
/// <summary>
/// 是否使用颜色(仅用于 Console
/// </summary>
public bool UseColors { get; set; } = true;
/// <summary>
/// 缓冲区大小(仅用于 Async
/// </summary>
public int BufferSize { get; set; } = 10000;
/// <summary>
/// 最大文件大小(仅用于 RollingFile字节
/// </summary>
public long MaxFileSize { get; set; } = 10 * 1024 * 1024;
/// <summary>
/// 最大文件数量(仅用于 RollingFile
/// </summary>
public int MaxFileCount { get; set; } = 5;
/// <summary>
/// 过滤器配置。
/// </summary>
public FilterConfiguration? Filter { get; set; }
/// <summary>
/// 内部 Appender 配置(仅用于 Async
/// </summary>
public AppenderConfiguration? InnerAppender { get; set; }
}