public static LogEvent Enrich(this LogEvent logEvent, IBrokerLogEnricher logEnricher) { var message = $"{logEvent.Message} | " + "endpointName: {endpointName}, " + "messageType: {messageType}, " + "messageId: {messageId}, " + $"{logEnricher.AdditionalPropertyName1}: {{{logEnricher.AdditionalPropertyName1}}}, " + $"{logEnricher.AdditionalPropertyName2}: {{{logEnricher.AdditionalPropertyName2}}}"; return(new LogEvent( logEvent.Level, logEvent.EventId, message)); }
public InboundLogger(IBrokerLogEnricher logEnricher) { _logEnricher = Check.NotNull(logEnricher, nameof(logEnricher)); _processingInboundMessage = SilverbackLoggerMessage.Define <string, string?, string?, string?, string?>( EnrichLogEvent(IntegrationLogEvents.ProcessingInboundMessage)); _errorProcessingInboundMessage = SilverbackLoggerMessage.Define <string, string?, string?, string?, string?>( EnrichLogEvent(IntegrationLogEvents.ErrorProcessingInboundMessage)); _consumerFatalError = SilverbackLoggerMessage.Define <string, string?, string?, string?, string?>( EnrichLogEvent(IntegrationLogEvents.ConsumerFatalError)); _retryMessageProcessing = SilverbackLoggerMessage.Define <string, string?, string?, string?, string?>( EnrichLogEvent(IntegrationLogEvents.RetryMessageProcessing)); _messageMoved = SilverbackLoggerMessage.Define <string, string, string?, string?, string?, string?>( EnrichLogEvent(IntegrationLogEvents.MessageMoved)); _messageSkipped = SilverbackLoggerMessage.Define <string, string?, string?, string?, string?>( EnrichLogEvent(IntegrationLogEvents.MessageSkipped)); _cannotMoveSequences = SilverbackLoggerMessage.Define <string, string, string?, string?, string?, string?>( EnrichLogEvent(IntegrationLogEvents.CannotMoveSequences)); _rollbackToRetryFailed = SilverbackLoggerMessage.Define <string, string?, string?, string?, string?>( EnrichLogEvent(IntegrationLogEvents.RollbackToRetryFailed)); _rollbackToSkipFailed = SilverbackLoggerMessage.Define <string, string?, string?, string?, string?>( EnrichLogEvent(IntegrationLogEvents.RollbackToSkipFailed)); _nullMessageSkipped = SilverbackLoggerMessage.Define <string, string?, string?, string?, string?>( EnrichLogEvent(IntegrationLogEvents.NullMessageSkipped)); _messageAlreadyProcessed = SilverbackLoggerMessage.Define <string, string?, string?, string?, string?>( EnrichLogEvent(IntegrationLogEvents.MessageAlreadyProcessed)); }
public OutboundLogger(IBrokerLogEnricher logEnricher) { _logEnricher = Check.NotNull(logEnricher, nameof(logEnricher)); _messageProduced = SilverbackLoggerMessage.Define <string, string?, string?, string?, string?>( IntegrationLogEvents.MessageProduced.Enrich(_logEnricher)); _errorProducingMessage = SilverbackLoggerMessage.Define <string, string?, string?, string?, string?>( IntegrationLogEvents.ErrorProducingMessage.Enrich(_logEnricher)); _messageWrittenToOutbox = SilverbackLoggerMessage.Define <string, string?, string?, string?, string?>( IntegrationLogEvents.MessageWrittenToOutbox.Enrich(_logEnricher)); _errorProducingOutboxStoredMessage = SilverbackLoggerMessage.Define <string, string?, string?, string?, string?>( IntegrationLogEvents.ErrorProducingOutboxStoredMessage.Enrich(_logEnricher)); }