[优化] 增加日志等级配置,更新服务器启动日志信息

This commit is contained in:
ryan
2026-03-13 11:30:42 +08:00
parent 3fb4cec99c
commit c3f8bd20b3
4 changed files with 190 additions and 140 deletions
+1 -1
View File
@@ -83,7 +83,7 @@ func main() {
if port == "" {
port = strconv.Itoa(*common.Port)
}
common.SysLog(fmt.Sprintf("server config: port=%s gin_mode=%s sqlite_path=%s redis_enabled=%t upload_path=%s log_dir=%s agent_token_configured=%t node_offline_threshold=%s", port, gin.Mode(), common.SQLitePath, common.RedisEnabled, common.UploadPath, valueOrDefault(*common.LogDir, "stdout"), common.AgentToken != "", common.NodeOfflineThreshold))
common.SysLog(fmt.Sprintf("server config: port=%s gin_mode=%s log_level=%s sqlite_path=%s redis_enabled=%t upload_path=%s log_dir=%s agent_token_configured=%t node_offline_threshold=%s", port, gin.Mode(), common.GetLogLevel(), common.SQLitePath, common.RedisEnabled, common.UploadPath, valueOrDefault(*common.LogDir, "stdout"), common.AgentToken != "", common.NodeOfflineThreshold))
common.SysLog(fmt.Sprintf("server listening on :%s", port))
err = server.Run(":" + port)
if err != nil {