Skip to content

Commit

Permalink
set event info for eventual processes
Browse files Browse the repository at this point in the history
  • Loading branch information
somolinosm authored and adrianpozueco committed Jul 7, 2021
1 parent d4dd0df commit b7ad767
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions logger/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

0 comments on commit b7ad767

Please sign in to comment.