Browse Source

Update traces templates

pull/952/head
Miguel Veloso 6 years ago
parent
commit
7dbab01b44
6 changed files with 7 additions and 7 deletions
  1. +1
    -1
      src/Services/Basket/Basket.API/Controllers/BasketController.cs
  2. +1
    -1
      src/Services/Catalog/Catalog.API/IntegrationEvents/CatalogIntegrationEventService.cs
  3. +1
    -1
      src/Services/Ordering/Ordering.API/Application/Behaviors/TransactionBehaviour.cs
  4. +1
    -1
      src/Services/Ordering/Ordering.API/Application/Behaviors/ValidatorBehavior.cs
  5. +2
    -2
      src/Services/Ordering/Ordering.API/Application/IntegrationEvents/EventHandling/UserCheckoutAcceptedIntegrationEventHandler.cs
  6. +1
    -1
      src/Services/Ordering/Ordering.API/Application/IntegrationEvents/OrderingIntegrationEventService.cs

+ 1
- 1
src/Services/Basket/Basket.API/Controllers/BasketController.cs View File

@ -86,7 +86,7 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API.Controllers
}
catch (Exception ex)
{
_logger.LogError(ex, "----- ERROR Publishing integration event: {IntegrationEventId} from {ShortAppName}", eventMessage.Id, Program.ShortAppName);
_logger.LogError(ex, "ERROR Publishing integration event: {IntegrationEventId} from {ShortAppName}", eventMessage.Id, Program.ShortAppName);
throw;
}


+ 1
- 1
src/Services/Catalog/Catalog.API/IntegrationEvents/CatalogIntegrationEventService.cs View File

@ -47,7 +47,7 @@ namespace Catalog.API.IntegrationEvents
}
catch (Exception ex)
{
_logger.LogError(ex, "----- ERROR Publishing integration event: {IntegrationEventId} from {ShortAppName} - ({@IntegrationEvent})", evt.Id, Program.ShortAppName, evt);
_logger.LogError(ex, "ERROR Publishing integration event: {IntegrationEventId} from {ShortAppName} - ({@IntegrationEvent})", evt.Id, Program.ShortAppName, evt);
await _eventLogService.MarkEventAsFailedAsync(evt.Id);
}
}


+ 1
- 1
src/Services/Ordering/Ordering.API/Application/Behaviors/TransactionBehaviour.cs View File

@ -60,7 +60,7 @@ namespace Ordering.API.Application.Behaviors
}
catch (Exception ex)
{
_logger.LogError(ex, "----- ERROR Handling transaction for {CommandName} ({@Command})", typeName, request);
_logger.LogError(ex, "ERROR Handling transaction for {CommandName} ({@Command})", typeName, request);
throw;
}


+ 1
- 1
src/Services/Ordering/Ordering.API/Application/Behaviors/ValidatorBehavior.cs View File

@ -33,7 +33,7 @@ namespace Ordering.API.Application.Behaviors
if (failures.Any())
{
_logger.LogWarning("----- Validation errors - {CommandType} - Command: {@Command} - Errors: {@ValidationErrors}", typeName, request, failures);
_logger.LogWarning("Validation errors - {CommandType} - Command: {@Command} - Errors: {@ValidationErrors}", typeName, request, failures);
throw new OrderingDomainException(
$"Command Validation Errors for type {typeof(TRequest).Name}", new ValidationException("Validation exception", failures));


+ 2
- 2
src/Services/Ordering/Ordering.API/Application/IntegrationEvents/EventHandling/UserCheckoutAcceptedIntegrationEventHandler.cs View File

@ -67,13 +67,13 @@ namespace Ordering.API.Application.IntegrationEvents.EventHandling
}
else
{
_logger.LogWarning("----- CreateOrderCommand failed - RequestId: {RequestId}", @event.RequestId);
_logger.LogWarning("CreateOrderCommand failed - RequestId: {RequestId}", @event.RequestId);
}
}
}
else
{
_logger.LogWarning("----- Invalid IntegrationEvent - RequestId is missing - {@IntegrationEvent}", @event);
_logger.LogWarning("Invalid IntegrationEvent - RequestId is missing - {@IntegrationEvent}", @event);
}
}
}


+ 1
- 1
src/Services/Ordering/Ordering.API/Application/IntegrationEvents/OrderingIntegrationEventService.cs View File

@ -55,7 +55,7 @@ namespace Ordering.API.Application.IntegrationEvents
}
catch (Exception ex)
{
_logger.LogError(ex, "----- ERROR publishing integration event: {IntegrationEventId} from {ShortAppName}", logEvt.EventId, Program.ShortAppName);
_logger.LogError(ex, "ERROR publishing integration event: {IntegrationEventId} from {ShortAppName}", logEvt.EventId, Program.ShortAppName);
await _eventLogService.MarkEventAsFailedAsync(logEvt.EventId);
}


Loading…
Cancel
Save