From ebf597b31d70695e41797e08b25d93e91deefbd1 Mon Sep 17 00:00:00 2001 From: Keepers Date: Mon, 27 Feb 2023 14:29:20 -0700 Subject: [PATCH] logging tweaks (#2663) #### Does this PR need a docs update or release note? - [x] :no_entry: No #### Type of change - [ ] :bug: Bugfix #### Issue(s) * #1970 #### Test Plan - [x] :zap: Unit test --- src/internal/connector/graph/service.go | 4 +++- src/internal/operations/restore.go | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/internal/connector/graph/service.go b/src/internal/connector/graph/service.go index f19322fa4..58cfab18e 100644 --- a/src/internal/connector/graph/service.go +++ b/src/internal/connector/graph/service.go @@ -324,7 +324,9 @@ func (handler *LoggingMiddleware) Intercept( "response", string(respDump), ) } else if resp.StatusCode/100 != 2 { - logger.Ctx(ctx).Infow("graph api error", "status", resp.Status, "method", req.Method, "url", req.URL) + logger.Ctx(ctx). + With("status", resp.Status, "method", req.Method, "url", req.URL). + Infof("graph api error: %s", resp.Status) } } diff --git a/src/internal/operations/restore.go b/src/internal/operations/restore.go index 0dfced27a..70c179625 100644 --- a/src/internal/operations/restore.go +++ b/src/internal/operations/restore.go @@ -138,7 +138,8 @@ func (op *RestoreOperation) Run(ctx context.Context) (restoreDetails *details.De ctx, "tenant_id", op.account.ID(), // TODO: pii "backup_id", op.BackupID, - "service", op.Selectors.Service) + "service", op.Selectors.Service, + "destination_container", op.Destination.ContainerName) // ----- // Execution