Remove fmt.Println and add Zerolog logging system
Some checks failed
Build and Push Docker Image / build_and_push (push) Failing after 1m2s
Some checks failed
Build and Push Docker Image / build_and_push (push) Failing after 1m2s
This commit is contained in:
@@ -2,9 +2,9 @@ package grpcapi
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
|
||||
"git.coopgo.io/coopgo-platform/mobility-accounts/storage"
|
||||
"github.com/rs/zerolog/log"
|
||||
"google.golang.org/protobuf/encoding/protojson"
|
||||
"google.golang.org/protobuf/types/known/structpb"
|
||||
)
|
||||
@@ -27,7 +27,7 @@ func (a Account) ToStorageType() storage.Account {
|
||||
for k, d := range a.Data.GetFields() {
|
||||
jsondata, err := protojson.Marshal(d)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
log.Error().Err(err).Msg("")
|
||||
break
|
||||
}
|
||||
var data any
|
||||
@@ -68,7 +68,7 @@ func AccountFromStorageType(account *storage.Account) (*Account, error) {
|
||||
|
||||
data, err := structpb.NewStruct(d)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
log.Error().Err(err).Msg("")
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user