规范并补充日志内容

This commit is contained in:
2026-01-16 14:30:42 +08:00
parent 4e0bb33ce2
commit fd6a82eb4e
28 changed files with 325 additions and 537 deletions

View File

@@ -1,4 +1,7 @@
namespace SHH.CameraSdk;
using Ayay.SerilogLogs;
using Serilog;
namespace SHH.CameraSdk;
/// <summary>
/// [配置中心] 预处理参数管理器
@@ -6,6 +9,8 @@
/// </summary>
public class ProcessingConfigManager
{
private static ILogger _sysLog = Log.ForContext("SourceContext", LogModules.Core);
// 内存字典Key=设备ID, Value=配置对象
private readonly ConcurrentDictionary<long, ProcessingOptions> _configs = new();
@@ -30,7 +35,7 @@ public class ProcessingConfigManager
// 直接覆盖旧配置,由于是引用替换,原子性较高
_configs.AddOrUpdate(deviceId, newOptions, (key, old) => newOptions);
Console.WriteLine($"[ConfigManager] 设备 {deviceId} 预处理参数已更新: " +
_sysLog.Information($"[ConfigManager] 设备 {deviceId} 预处理参数已更新: " +
$"Expand={newOptions.EnableExpand} Shrink:{newOptions.EnableShrink} 分辨率:({newOptions.TargetWidth}x{newOptions.TargetHeight}), " +
$"EnableBrightness}}={newOptions.EnableBrightness}");
}