From a73d32c4c2340ecb293dda07b3c9efaa8f8255b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20Santos?= Date: Mon, 2 Dec 2024 13:21:59 +0000 Subject: [PATCH] Lower level of openvpn warning --- .../kotlin/org/ooni/probe/domain/RunNetTest.kt | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/composeApp/src/commonMain/kotlin/org/ooni/probe/domain/RunNetTest.kt b/composeApp/src/commonMain/kotlin/org/ooni/probe/domain/RunNetTest.kt index 562b9594..38fc49b0 100644 --- a/composeApp/src/commonMain/kotlin/org/ooni/probe/domain/RunNetTest.kt +++ b/composeApp/src/commonMain/kotlin/org/ooni/probe/domain/RunNetTest.kt @@ -112,9 +112,11 @@ class RunNetTest( is TaskEvent.Log -> { Logger.log( - severity = when (event.level) { - "WARNING" -> Severity.Warn - "DEBUG" -> Severity.Debug + severity = when { + event.level == "WARNING" && !LOGS_TO_LOWER_LEVEL.contains(event.message) -> + Severity.Warn + + event.level == "DEBUG" -> Severity.Debug else -> Severity.Info }, message = event.message, @@ -315,4 +317,10 @@ class RunNetTest( Failure(message, value) inner class BugJsonDump(value: TaskEventResult.Value?) : Failure(null, value) + + companion object { + private val LOGS_TO_LOWER_LEVEL = listOf( + "Picking from default OpenVPN endpoints", + ) + } }