fix(log): fix scrambled config log output

This commit is contained in:
yusing
2025-11-13 20:49:38 +08:00
parent efe1350ffd
commit f46552b477

View File

@@ -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
}