From 140aebc1d55feac4641ffceeacf05dc355ee14b4 Mon Sep 17 00:00:00 2001 From: Brahim Hadriche Date: Thu, 4 Sep 2025 11:59:13 -0400 Subject: [PATCH] [skip ci] Syslog filtering --- CHANGELOG.md | 4 ++++ playlet-lib/src/components/Logger/Logger.bs | 10 +++++++--- playlet-lib/src/components/Telemetry/Sentry.bs | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a95e664..c1eb407f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] + +- Nothing worth mentioning yet. + ## [0.41.4] - 2025-09-04 ### Fixed diff --git a/playlet-lib/src/components/Logger/Logger.bs b/playlet-lib/src/components/Logger/Logger.bs index 80e08fcb..aa3b105a 100644 --- a/playlet-lib/src/components/Logger/Logger.bs +++ b/playlet-lib/src/components/Logger/Logger.bs @@ -118,7 +118,11 @@ function OnLineSysLog(event as object, dateTime as object, logsFile as string, b ' They're usually repetitive, one is reported for each stream in a DASH ' when a video is blocked if m.sysLogEventDropCounter = 0 - m.global.telemetry.logError = line + m.global.telemetry.LogEvent = { + level: "error" + message: line + fingerprint: ["SysLog", info.Status, info.LogType, info.HttpCode, info.Method] + } end if m.sysLogEventDropCounter = (m.sysLogEventDropCounter + 1) mod 10 end function @@ -129,7 +133,7 @@ function OnLineLogMonitorMemoryWarning(event as object, dateTime as object, logs print line buffer.FromAsciiString(line + `\n`) buffer.AppendFile(logsFile) - m.global.telemetry.logWarn = line + m.global.telemetry.LogWarn = line end function function OnLineLogDeviceInfoMemoryWarning(event as object, dateTime as object, logsFile as string, buffer as object) as void @@ -148,7 +152,7 @@ function OnLineLogDeviceInfoMemoryWarning(event as object, dateTime as object, l print line buffer.FromAsciiString(line + `\n`) buffer.AppendFile(logsFile) - m.global.telemetry.logWarn = line + m.global.telemetry.LogWarn = line end function ' Note: although the timestamp should be captured in the caller, not the logger, diff --git a/playlet-lib/src/components/Telemetry/Sentry.bs b/playlet-lib/src/components/Telemetry/Sentry.bs index 5ef9e329..387b6d43 100644 --- a/playlet-lib/src/components/Telemetry/Sentry.bs +++ b/playlet-lib/src/components/Telemetry/Sentry.bs @@ -78,7 +78,7 @@ namespace Sentry response = request.Await() if not response.IsSuccess() #if DEBUG - LogErrorNoTelemetry("Failed to send event to Sentry:", response.ErrorMessage()) + LogErrorNoTelemetry("Failed to send event to Sentry:", response.ErrorMessage(), `\nHeaders:`, response.Headers()) #end if statusCode = response.StatusCode()