Skip to content

Commit

Permalink
do not add external id to log if it is zero value
Browse files Browse the repository at this point in the history
  • Loading branch information
nileshpcode committed Jun 23, 2021
1 parent b5c3b6a commit fde4329
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions context/ExecutionContext.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ func NewExecutionContext(token *security.JwtToken, correlationID string, action
Str("action", action).
Str("correlationId", cid).Logger()

if len(token.ExternalID) > 0 {
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()
executionCtxLogger = executionCtxLogger.With().Str("externalIdType", token.ExternalIDType).Logger()
}

} else {
Expand Down

0 comments on commit fde4329

Please sign in to comment.