From 524cd2fde9698e025fa7c3167c731ed9b667390b Mon Sep 17 00:00:00 2001 From: ImSoZRious Date: Sun, 9 Jul 2023 19:35:22 +0700 Subject: [PATCH] chore: use verbose log --- internal/service/user/user.service.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/internal/service/user/user.service.go b/internal/service/user/user.service.go index fe6c715..afbd044 100644 --- a/internal/service/user/user.service.go +++ b/internal/service/user/user.service.go @@ -46,6 +46,12 @@ func (s *serviceImpl) FindOne(_ context.Context, req *proto.FindOneUserRequest) if ok { switch st.Code() { case codes.NotFound: + log.Error(). + Err(err). + Str("service", "user"). + Str("module", "find one"). + Str("id", req.Id). + Msg("User image not found") return &proto.FindOneUserResponse{User: RawToDto(&raw, "")}, nil case codes.Unavailable: @@ -78,6 +84,13 @@ func (s *serviceImpl) FindOne(_ context.Context, req *proto.FindOneUserRequest) return nil, err } + log.Error(). + Err(err). + Str("service", "user"). + Str("module", "find one"). + Str("id", req.Id). + Msg("Found user image") + return &proto.FindOneUserResponse{User: RawToDto(&raw, url)}, nil }