added id for logger

This commit is contained in:
pb 2025-06-02 10:34:58 +02:00
parent 9ae5f3b91d
commit 3c15907427

View File

@ -9,6 +9,7 @@ import (
"cloud.o-forge.io/core/oc-lib/dbs/mongo"
"cloud.o-forge.io/core/oc-lib/logs"
beego "github.com/beego/beego/v2/server/web"
"github.com/google/uuid"
)
type APIRequest struct {
@ -135,7 +136,8 @@ func (a *API) CheckRemotePeer(url string) (State, map[string]int) {
// CheckRemoteAPIs checks the state of remote APIs from your proper OC
func (a *API) CheckRemoteAPIs(apis []DataType) (State, map[string]string, error) {
l := logs.GetLogger()
id := uuid.New()
l := logs.GetLogger().With().Str("id",id.String()).Logger()
l.Debug().Msg("Start checking")
// Check if the database is up
new := map[string]string{}