Skip to content

Commit e2705e8

Browse files
authored
suppress unnecessary log messages (#92)
1 parent ce551aa commit e2705e8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

kotlin-mbedtls/src/main/kotlin/org/opencoap/ssl/SslConfig.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,11 +187,11 @@ class SslConfig(
187187
private val logger = LoggerFactory.getLogger(MbedtlsApi::class.java)
188188
fun callback(ctx: Pointer?, debugLevel: Int, fileName: String, lineNumber: Int, message: String?) {
189189
if (debugLevel == 1) {
190-
// seems like a bug in log levels:
191-
if (message?.startsWith("got supported group") == true) return
192-
193190
// Introduced in MbedTLS 4.0.0: this log message should be at trace level, not warning
191+
// These should be fixed in the next MbedTLS release of 4.x
194192
if (message?.startsWith("Perform PSA-based ECDH computation") == true) return
193+
if (message?.startsWith("<= mbedtls_ssl_check_record") == true) return
194+
if (message?.startsWith("=> mbedtls_ssl_check_record") == true) return
195195

196196
// logs when close notify is received
197197
if (message?.startsWith("mbedtls_ssl_handle_message_type() returned -30848 (-0x7880)") == true) return

0 commit comments

Comments
 (0)