From 683954c63980381bb30c214c2c4e97e53b0ecf05 Mon Sep 17 00:00:00 2001 From: Giuseppe Lo Presti Date: Mon, 25 Nov 2024 10:03:15 +0100 Subject: [PATCH] Improved logging on createHome (#4970) --- changelog/unreleased/log-home.md | 3 +++ internal/grpc/services/gateway/storageprovider.go | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 changelog/unreleased/log-home.md diff --git a/changelog/unreleased/log-home.md b/changelog/unreleased/log-home.md new file mode 100644 index 0000000000..4a82170ab1 --- /dev/null +++ b/changelog/unreleased/log-home.md @@ -0,0 +1,3 @@ +Enhancement: improved logging on createHome + +https://github.com/cs3org/reva/pull/4970 diff --git a/internal/grpc/services/gateway/storageprovider.go b/internal/grpc/services/gateway/storageprovider.go index a9278a13c9..9a9d444ea2 100644 --- a/internal/grpc/services/gateway/storageprovider.go +++ b/internal/grpc/services/gateway/storageprovider.go @@ -84,6 +84,7 @@ func (s *svc) CreateHome(ctx context.Context, req *provider.CreateHomeRequest) ( home := s.getHome(ctx) c, err := s.findByPath(ctx, home) if err != nil { + log.Err(err).Str("home", home).Msg("gateway: error finding home on storage provider") return &provider.CreateHomeResponse{ Status: status.NewStatusFromErrType(ctx, "error finding home", err), }, nil @@ -91,7 +92,7 @@ func (s *svc) CreateHome(ctx context.Context, req *provider.CreateHomeRequest) ( res, err := c.CreateHome(ctx, req) if err != nil { - log.Err(err).Msg("gateway: error creating home on storage provider") + log.Err(err).Str("home", home).Msg("gateway: error creating home on storage provider") return &provider.CreateHomeResponse{ Status: status.NewInternal(ctx, err, "error calling CreateHome"), }, nil