From fde43295b2c2fe2957d9302d944706c1de857381 Mon Sep 17 00:00:00 2001 From: Neel Patel Date: Wed, 23 Jun 2021 20:10:40 +0530 Subject: [PATCH] do not add external id to log if it is zero value --- context/ExecutionContext.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/context/ExecutionContext.go b/context/ExecutionContext.go index d7a8df6..d7aabac 100644 --- a/context/ExecutionContext.go +++ b/context/ExecutionContext.go @@ -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 {