using System;
using System.IO;
namespace XP.Common.Logging.Configs
{
///
/// Serilog 日志配置实体(从 App.config 读取)| Serilog logging configuration entity (loaded from App.config)
///
public class SerilogConfig
{
///
/// 日志输出根路径(默认:AppData/Files/Logs)| Log output root path (default: AppData/Files/Logs)
///
public string LogPath { get; set; } = Path.Combine(
Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData),
"Files", "Logs");
///
/// 最低日志级别(Debug/Info/Warn/Error/Fatal)| Minimum log level
///
public string MinimumLevel { get; set; } = "Info";
///
/// 是否输出到控制台(调试环境=true,生产环境=false)| Whether to output to console
///
public bool EnableConsole { get; set; } = true;
///
/// 日志文件分割规则(Day/Month/Hour/Size)| Log file rolling interval
///
public string RollingInterval { get; set; } = "Day";
///
/// 单个日志文件最大大小(MB,仅 Size 分割时生效)| Single log file max size (MB)
///
public long FileSizeLimitMB { get; set; } = 100;
///
/// 保留日志文件数量(默认30天)| Retained file count limit (default 30)
///
public int RetainedFileCountLimit { get; set; } = 30;
}
}