From fabb4134bc4c07d613b27c09f45cd13c92c1a7c8 Mon Sep 17 00:00:00 2001 From: Denis Kirillov Date: Thu, 22 Feb 2024 10:36:15 +0300 Subject: [PATCH] [#318] Use log msg from constants Signed-off-by: Denis Kirillov --- api/middleware/policy.go | 2 +- internal/logs/logs.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/api/middleware/policy.go b/api/middleware/policy.go index 8b618a4d..082ba3fc 100644 --- a/api/middleware/policy.go +++ b/api/middleware/policy.go @@ -133,7 +133,7 @@ func getPolicyRequest(r *http.Request, frostfsid FrostFSIDInformer, reqType ReqT res = fmt.Sprintf(s3.ResourceFormatS3Bucket, bktName) } - reqLogOrDefault(r.Context(), log).Debug("policy request", zap.String("action", op), + reqLogOrDefault(r.Context(), log).Debug(logs.PolicyRequest, zap.String("action", op), zap.String("resource", res), zap.String("owner", owner)) return testutil.NewRequest(op, testutil.NewResource(res, nil), diff --git a/internal/logs/logs.go b/internal/logs/logs.go index 0561b4a9..c4da907c 100644 --- a/internal/logs/logs.go +++ b/internal/logs/logs.go @@ -147,4 +147,5 @@ const ( SettingsNodeInvalidOwnerKey = "settings node: invalid owner key" FailedToSendTransaction = "failed to send transaction" SuccessfulAuth = "successful auth" + PolicyRequest = "policy request" )