增加很多功能

增加几个日志监控功能
This commit is contained in:
2026-03-19 11:55:00 +08:00
parent f4d67cb673
commit 0aa223d891
7 changed files with 105 additions and 20 deletions

View File

@@ -11,6 +11,7 @@ namespace BLWLogProduce.Models
{
public static CSRedisClient? redis4;
public static CSRedisClient? redis6;
public static CSRedisClient? redis7;
public static Logger logger = LogManager.GetCurrentClassLogger();
private const string ip = "127.0.0.1";
@@ -22,6 +23,7 @@ namespace BLWLogProduce.Models
{
redis4 = new CSRedisClient(redisHostStr + ",password=,defaultDatabase=4");
redis6 = new CSRedisClient(redisHostStr + ",password=,defaultDatabase=6");
redis7 = new CSRedisClient(redisHostStr + ",password=,defaultDatabase=7");
string channel = "__keyevent@6__:expired";
var QQQ = new ValueTuple<string, Action<CSRedisClient.SubscribeMessageEventArgs>>(channel, (msg) =>
{
@@ -38,6 +40,7 @@ namespace BLWLogProduce.Models
string str = Newtonsoft.Json.JsonConvert.SerializeObject(o);
redis6.Publish("redis-on_off_line", str);
//redis7.Del(o.HostNumber);
}
}
catch (Exception ex)