feat(logManagement): implement log management service

This commit is contained in:
shiyu
2025-06-06 11:39:39 +08:00
parent a73752bcc8
commit a95651b04a
34 changed files with 1644 additions and 108 deletions

View File

@@ -0,0 +1,18 @@
namespace Foxel.Models.Response.Log;
public class LogResponse
{
public int Id { get; set; }
public LogLevel Level { get; set; }
public string Message { get; set; } = string.Empty;
public string Category { get; set; } = string.Empty;
public int? EventId { get; set; }
public DateTime Timestamp { get; set; }
public string? Exception { get; set; }
public string? RequestPath { get; set; }
public string? RequestMethod { get; set; }
public int? StatusCode { get; set; }
public string? IPAddress { get; set; }
public int? UserId { get; set; }
public string? Properties { get; set; }
}

View File

@@ -0,0 +1,24 @@
namespace Foxel.Models.Response.Log;
public class LogStatistics
{
/// <summary>
/// 总日志数
/// </summary>
public int TotalCount { get; set; }
/// <summary>
/// 今日日志数
/// </summary>
public int TodayCount { get; set; }
/// <summary>
/// 错误日志数Error + Critical
/// </summary>
public int ErrorCount { get; set; }
/// <summary>
/// 警告日志数
/// </summary>
public int WarningCount { get; set; }
}