From f46552b47719a6bddf46b1724afa7feb43bbb5b1 Mon Sep 17 00:00:00 2001 From: yusing Date: Thu, 13 Nov 2025 20:49:38 +0800 Subject: [PATCH] fix(log): fix scrambled config log output --- internal/config/state.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/config/state.go b/internal/config/state.go index d854d6a9..bbc49b31 100644 --- a/internal/config/state.go +++ b/internal/config/state.go @@ -409,5 +409,6 @@ func (state *state) printRoutesByProvider(lenLongestName int) { func (state *state) printState() { state.tmpLog.Info().Msg("active config:") - yaml.NewEncoder(state.tmpLog).Encode(state.Config) + yamlRepr, _ := yaml.Marshal(state.Config) + state.tmpLog.Info().Msgf("%s", yamlRepr) // prevent copying when casting to string }