main logger

This commit is contained in:
mr
2024-07-18 17:55:27 +02:00
parent 3e9eae007b
commit 0a441cd3df
7 changed files with 40 additions and 25 deletions

View File

@@ -2,7 +2,6 @@ package processing
import (
"cloud.o-forge.io/core/oc-lib/dbs/mongo"
"cloud.o-forge.io/core/oc-lib/logs"
"cloud.o-forge.io/core/oc-lib/models/utils"
)
@@ -33,8 +32,7 @@ func (pma *ProcessingMongoAccessor) LoadOne(id string) (utils.DBObject, error) {
res_mongo, err := mongo.MONGOService.LoadOne(id, pma.GetType())
if err != nil {
l := logs.CreateLogger("oclib", "")
l.Error().Msg("Could not retrieve " + id + " from db. Error: " + err.Error())
pma.Logger.Error().Msg("Could not retrieve " + id + " from db. Error: " + err.Error())
return nil, err
}