From 1df242fbe75be9fe5e5ffe96978f00c53905b459 Mon Sep 17 00:00:00 2001 From: Javier Marcos <1271349+javuto@users.noreply.github.com> Date: Thu, 7 Nov 2024 16:20:41 +0100 Subject: [PATCH] Better info messages starting osctrl-api --- api/main.go | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/api/main.go b/api/main.go index bd40ec16..92b32942 100644 --- a/api/main.go +++ b/api/main.go @@ -495,9 +495,7 @@ func osctrlAPIService() { // Ticker to reload environments // FIXME Implement Redis cache // FIXME splay this? - if settingsmgr.DebugService(settings.ServiceAPI) { - log.Debug().Msg("DebugService: Environments ticker") - } + log.Info().Msg("Initialize environments refresh") // Refresh environments as soon as service starts go func() { _t := settingsmgr.RefreshEnvs(settings.ServiceAPI) @@ -513,10 +511,8 @@ func osctrlAPIService() { // Ticker to reload settings // FIXME Implement Redis cache // FIXME splay this? - if settingsmgr.DebugService(settings.ServiceAPI) { - log.Debug().Msg("DebugService: Settings ticker") - } // Refresh settings as soon as the service starts + log.Info().Msg("Initialize settings refresh") go func() { _t := settingsmgr.RefreshSettings(settings.ServiceAPI) if _t == 0 { @@ -527,8 +523,8 @@ func osctrlAPIService() { time.Sleep(time.Duration(_t) * time.Second) } }() - // Initialize Admin handlers before router + log.Info().Msg("Initializing handlers") handlersApi = handlers.CreateHandlersApi( handlers.WithDB(db.Conn), handlers.WithEnvs(envs), @@ -545,9 +541,7 @@ func osctrlAPIService() { ) // ///////////////////////// API - if settingsmgr.DebugService(settings.ServiceAPI) { - log.Debug().Msg("DebugService: Creating router") - } + log.Info().Msg("Initializing router") // Create router for API endpoint muxAPI := http.NewServeMux() // API: root