From db192f22091cadf1e0da0675c88097375e97913b Mon Sep 17 00:00:00 2001 From: NanamiAdmin Date: Tue, 28 Apr 2026 20:49:11 +0800 Subject: [PATCH] fix(monitor): format exception message with XML tags Improve exception message formatting by adding XML tags for better parsing and processing downstream. The new format includes explicit tags for exception type, service name, and error message. --- monitor/monitor.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monitor/monitor.go b/monitor/monitor.go index 90a88dd..b579755 100644 --- a/monitor/monitor.go +++ b/monitor/monitor.go @@ -124,7 +124,7 @@ func checkServiceLogs(serviceName string) (bool, error) { func throwException(serviceName, errorContent string) error { postLog.Error(fmt.Sprintf("[Monitor] Service: %s - Exception: %s", serviceName, errorContent)) - err := socket.SendMsg(fmt.Sprintf("service %s exception: %s", serviceName, errorContent)) + err := socket.SendMsg(fmt.Sprintf("[Exception] %s %s %s", "service", serviceName, errorContent)) if err != nil { return fmt.Errorf("failed to send exception message: %v", err) }