feat(config): Enhance S2A configuration switch logging with detailed output

- Update success message to specifically indicate S2A configuration switch
- Add detailed logging output showing switched API endpoint
- Display concurrency, priority, and group IDs in configuration log
- Add conditional proxy information logging when proxy is enabled
- Improve user visibility into active configuration after switching profiles
This commit is contained in:
2026-02-07 22:47:37 +08:00
parent b7622070e6
commit d6cd7660eb

View File

@@ -328,7 +328,13 @@ func handleConfig(w http.ResponseWriter, r *http.Request) {
return return
} }
logger.Success("配置已更新并保存到数据库", "", "config") // 输出切换后的详细配置
logger.Success("S2A 配置已切换", "", "config")
logger.Info(fmt.Sprintf(" API: %s", config.Global.S2AApiBase), "", "config")
logger.Info(fmt.Sprintf(" 并发: %d | 优先级: %d | 分组: %v", config.Global.Concurrency, config.Global.Priority, config.Global.GroupIDs), "", "config")
if config.Global.ProxyEnabled {
logger.Info(fmt.Sprintf(" 代理: %s", config.Global.DefaultProxy), "", "config")
}
api.Success(w, map[string]string{"message": "配置已更新"}) api.Success(w, map[string]string{"message": "配置已更新"})
default: default: