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