diff --git a/core/logger/attrs.go b/core/logger/attrs.go index a8cc17b..518d180 100644 --- a/core/logger/attrs.go +++ b/core/logger/attrs.go @@ -12,6 +12,7 @@ const ( CounterIDAttr = "counterId" ErrorAttr = "error" FailureMessageAttr = "failureMessage" + BodyAttr = "body" HTTPMethodAttr = "httpMethod" HTTPStatusAttr = "httpStatusCode" HTTPStatusNameAttr = "httpStatusName" @@ -27,3 +28,7 @@ func ErrAttr(err any) slog.Attr { func HTTPStatus(code int) []any { return []any{slog.Int(HTTPStatusAttr, code), slog.String(HTTPStatusNameAttr, http.StatusText(code))} } + +func Body(val any) slog.Attr { + return slog.Any(BodyAttr, val) +}