Skip to content

Commit

Permalink
Merge pull request #25 from islax/externalId_to_execution_context_logger
Browse files Browse the repository at this point in the history
Added externalId to execution context logger
  • Loading branch information
kn-cyberinc authored Jun 23, 2021
2 parents ac17a07 + fde4329 commit 0a129ae
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions context/ExecutionContext.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,14 @@ func NewExecutionContext(token *security.JwtToken, correlationID string, action
Str("action", action).
Str("correlationId", cid).Logger()

if len(token.ExternalID) > 0 && token.ExternalID != "00000000-0000-0000-0000-000000000000" {
executionCtxLogger = executionCtxLogger.With().Str("externalId", token.ExternalID).Logger()
}

if len(token.ExternalIDType) > 0 {
executionCtxLogger = executionCtxLogger.With().Str("externalIdType", token.ExternalIDType).Logger()
}

} else {
executionCtxLogger = logger.With().
Str("action", action).
Expand Down

0 comments on commit 0a129ae

Please sign in to comment.