fix: refine logging
All checks were successful
Build Docker Image / Build-Docker-Image (push) Successful in 44s
Build and Push Docker Image / Build-And-Push-Docker-Image (push) Successful in 48s

This commit was merged in pull request #293.
This commit is contained in:
2024-12-04 21:49:44 +01:00
parent 5198487feb
commit 521119fc02
14 changed files with 93 additions and 70 deletions

View File

@@ -1,11 +1,11 @@
package service
import (
"me-fit/log"
"me-fit/types"
"crypto/rand"
"encoding/base64"
"log/slog"
"github.com/google/uuid"
)
@@ -27,7 +27,7 @@ func (r *RandomServiceImpl) Bytes(size int) ([]byte, error) {
b := make([]byte, 32)
_, err := rand.Read(b)
if err != nil {
slog.Error("Error generating random bytes: " + err.Error())
log.Error("Error generating random bytes: %v", err)
return []byte{}, types.ErrInternal
}