Skip to content

Commit

Permalink
Merge pull request #11 from Ryanair/feature/gofrlib-compatibilty-update
Browse files Browse the repository at this point in the history
Added new gofrlib version
  • Loading branch information
zarzaa authored Apr 12, 2023
2 parents 6293f9d + 2f3055b commit 6c0f35d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 5 additions & 3 deletions logger/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -26,6 +27,7 @@ func InitLoggerTest() {
"test",
"test-project",
"test-project-group",
"version",
"")

InitLogger(logConfiguration)
Expand Down Expand Up @@ -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)

Expand All @@ -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)
}
}

0 comments on commit 6c0f35d

Please sign in to comment.