Remove all fmr.Println and add zerolog logging
Some checks failed
Build and Push Docker Image / build_and_push (push) Failing after 1m52s

This commit is contained in:
2024-11-11 19:50:17 +01:00
parent a51f077358
commit a8acc9950a
30 changed files with 333 additions and 325 deletions

View File

@@ -2,12 +2,12 @@ package services
import (
"context"
"fmt"
"sort"
"git.coopgo.io/coopgo-apps/parcoursmob/utils/sorting"
fleets "git.coopgo.io/coopgo-platform/fleets/grpcapi"
"git.coopgo.io/coopgo-platform/fleets/storage"
"github.com/rs/zerolog/log"
"google.golang.org/grpc"
)
@@ -62,7 +62,7 @@ func (s *ServicesHandler) GetVehiclesMap() (vehicles map[string]storage.Vehicle,
}
resp, err := s.GRPC.Fleets.GetVehicles(context.TODO(), request)
if err != nil {
fmt.Println(err)
log.Error().Err(err).Msg("")
} else {
for _, vehicle := range resp.Vehicles {
vehicles[vehicle.Id] = vehicle.ToStorageType()