30 lines
1.6 KiB
C#
30 lines
1.6 KiB
C#
namespace Ayay.SerilogLogs
|
||
{
|
||
/// <summary>
|
||
/// 统一管理系统中的日志模块名称(SourceContext)
|
||
/// <para>使用常量可以避免硬编码字符串带来的拼写错误</para>
|
||
/// </summary>
|
||
public static class LogModules
|
||
{
|
||
// --- 核心架构层 ---
|
||
public static string Core { get; } = "Core"; // 系统主逻辑/启动关闭
|
||
public static string Network { get; } = "Network"; // 底层网络通讯 (TCP/UDP)
|
||
public static string WebApi { get; } = "WebAPI"; // 对外 HTTP 接口
|
||
public static string gRpc { get; } = "gRpc"; // 对外 gRpc 接口
|
||
|
||
public static string WebSocket { get; } = "WebSocket"; // 实时通讯
|
||
public static string Ping { get; } = "Ping"; // 心跳/Ping包 (通常量大且不重要)
|
||
|
||
// --- 业务逻辑层 ---
|
||
public static string UserSystem { get; } = "UserSystem"; // 用户账户/权限系统
|
||
public static string UserAction { get; } = "UserAction"; // 用户操作行为 (审计日志)
|
||
public static string DeviceOps { get; } = "DeviceOps"; // 设备运行/控制指令
|
||
|
||
// --- 核心算法层 ---
|
||
public static string Algorithm { get; } = "Algorithm"; // 算法分析/AI识别 (需要上下文追踪)
|
||
public static string Observation { get; } = "Observation"; // 观察点/埋点 (用于调试或统计)
|
||
|
||
// --- 第三方集成 ---
|
||
public static string HikVisionSdk { get; } = "HikVisionSdk"; // 第三方 SDK 调用封装
|
||
}
|
||
} |