From b7ad767d38be51b83462a6ff5f946cd15932495d Mon Sep 17 00:00:00 2001 From: "manu.somolinos" Date: Tue, 22 Jun 2021 08:48:49 +0200 Subject: [PATCH] set event info for eventual processes --- logger/logger.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/logger/logger.go b/logger/logger.go index 191f528..9181cb7 100644 --- a/logger/logger.go +++ b/logger/logger.go @@ -58,3 +58,9 @@ func SetRequestInfo(method string, url string, route string, query string, userA log.With("Body.context.origin.request.query", query) log.With("Body.context.origin.request.userAgent", userAgent) } + +func SetEvent(source string, body map[string]interface{}, params map[string]interface{}) { + log.With("Body.context.origin.event.eventSource", source) + log.With("Body.context.origin.event.eventBody", body) + log.With("Body.context.origin.event.eventParams", params) +}