added id for logger
This commit is contained in:
parent
9ae5f3b91d
commit
3c15907427
@ -9,6 +9,7 @@ import (
|
|||||||
"cloud.o-forge.io/core/oc-lib/dbs/mongo"
|
"cloud.o-forge.io/core/oc-lib/dbs/mongo"
|
||||||
"cloud.o-forge.io/core/oc-lib/logs"
|
"cloud.o-forge.io/core/oc-lib/logs"
|
||||||
beego "github.com/beego/beego/v2/server/web"
|
beego "github.com/beego/beego/v2/server/web"
|
||||||
|
"github.com/google/uuid"
|
||||||
)
|
)
|
||||||
|
|
||||||
type APIRequest struct {
|
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
|
// CheckRemoteAPIs checks the state of remote APIs from your proper OC
|
||||||
func (a *API) CheckRemoteAPIs(apis []DataType) (State, map[string]string, error) {
|
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")
|
l.Debug().Msg("Start checking")
|
||||||
// Check if the database is up
|
// Check if the database is up
|
||||||
new := map[string]string{}
|
new := map[string]string{}
|
||||||
|
Loading…
Reference in New Issue
Block a user