using Serilog.Events;
namespace Common.Logger;
///
/// 日志配置类
///
public class LoggerConfig
{
///
/// 是否启用控制台输出
///
public bool EnableConsole { get; set; } = true;
///
/// 是否启用文件输出
///
public bool EnableFile { get; set; } = true;
///
/// 日志文件路径
///
public string LogPath { get; set; } = "logs";
///
/// 单个日志文件最大大小(MB)
///
public int MaxFileSizeMB { get; set; } = 1;
///
/// 日志保留天数
///
public int RetentionDays { get; set; } = 30;
///
/// 压缩天数阈值(几天前的日志开始压缩)
///
public int CompressDaysThreshold { get; set; } = 3;
///
/// 最小日志级别
///
public LogEventLevel MinimumLevel { get; set; } = LogEventLevel.Information;
///
/// 日志格式模板
///
public string OutputTemplate { get; set; } = "{Timestamp:yyyy-MM-dd HH:mm:ss.fff} [{Level:u3}] {Message:lj}{NewLine}{Exception}";
///
/// 是否启用JSON格式
///
public bool UseJsonFormat { get; set; } = false;
///
/// 压缩检查间隔(小时)
///
public int CompressCheckIntervalHours { get; set; } = 24;
}