From 2f3055bcbc06fc85d6b0ff31b2e700534398f565 Mon Sep 17 00:00:00 2001 From: zarzaa <86242184+zarzaa@users.noreply.github.com> Date: Wed, 12 Apr 2023 08:19:27 +0000 Subject: [PATCH] Added new gofrlib version --- go.mod | 2 +- logger/logger.go | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index 2577709..41e63de 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/Ryanair/goetlib go 1.16 require ( - github.com/Ryanair/gofrlib v1.0.5 + github.com/Ryanair/gofrlib v1.0.16.3 github.com/aws/aws-lambda-go v1.24.0 github.com/aws/aws-sdk-go v1.38.63 github.com/kr/pretty v0.2.1 // indirect diff --git a/logger/logger.go b/logger/logger.go index 0df3a9d..17b76ee 100644 --- a/logger/logger.go +++ b/logger/logger.go @@ -6,12 +6,13 @@ import ( "github.com/aws/aws-lambda-go/events" ) -func NewLogConfiguration(logLevel string, application string, project string, projectGroup string) log.Configuration { +func NewLogConfiguration(logLevel string, application string, project string, projectGroup string, version string) log.Configuration { logConfiguration := log.NewConfiguration( logLevel, application, project, projectGroup, + version, "") return logConfiguration } @@ -26,6 +27,7 @@ func InitLoggerTest() { "test", "test-project", "test-project-group", + "version", "") InitLogger(logConfiguration) @@ -67,7 +69,7 @@ func SetEvent(source string, body string, params map[string]string) { log.With("Body.context.origin.event.eventParams", params) } -func SetSQSEvent(event events.SQSMessage) { +func SetSQSEvent(event events.SQSMessage) { log.With("Body.context.origin.event.eventSource", event.EventSource) log.With("Body.context.origin.event.eventBody", event.Body) @@ -81,4 +83,4 @@ func SetApigwRequest(event events.APIGatewayV2HTTPRequest) { log.With("Body.context.origin.request.route", event.RequestContext.RouteKey) log.With("Body.context.origin.request.query", event.RawQueryString) log.With("Body.context.origin.request.userAgent", event.RequestContext.HTTP.UserAgent) -} +} \ No newline at end of file