From ad8acd09020679ab9e5a336e57c593653e7ab07d Mon Sep 17 00:00:00 2001 From: Siyuan Date: Tue, 18 Nov 2025 14:33:12 +0000 Subject: [PATCH] chore(ota): only show selected TLS connection state fields in trace logging --- internal/ota/ota.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/internal/ota/ota.go b/internal/ota/ota.go index aae6cc66..5a97cfbd 100644 --- a/internal/ota/ota.go +++ b/internal/ota/ota.go @@ -84,7 +84,12 @@ func (s *State) newHTTPRequestWithTrace(ctx context.Context, method, url string, }, TLSHandshakeStart: func() { l().Msg("[tls] handshake started") }, TLSHandshakeDone: func(state tls.ConnectionState, err error) { - l().Interface("state", state).Err(err).Msg("[tls] handshake done") + l(). + Str("tlsVersion", tls.VersionName(state.Version)). + Str("cipherSuite", tls.CipherSuiteName(state.CipherSuite)). + Str("negotiatedProtocol", state.NegotiatedProtocol). + Str("serverName", state.ServerName). + Err(err).Msg("[tls] handshake done") }, }) }