Update traces templates
This commit is contained in:
parent
63a325e92e
commit
7dbab01b44
@ -86,7 +86,7 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API.Controllers
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
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;
|
throw;
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,7 @@ namespace Catalog.API.IntegrationEvents
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
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);
|
await _eventLogService.MarkEventAsFailedAsync(evt.Id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -60,7 +60,7 @@ namespace Ordering.API.Application.Behaviors
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
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;
|
throw;
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,7 @@ namespace Ordering.API.Application.Behaviors
|
|||||||
|
|
||||||
if (failures.Any())
|
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(
|
throw new OrderingDomainException(
|
||||||
$"Command Validation Errors for type {typeof(TRequest).Name}", new ValidationException("Validation exception", failures));
|
$"Command Validation Errors for type {typeof(TRequest).Name}", new ValidationException("Validation exception", failures));
|
||||||
|
@ -67,13 +67,13 @@ namespace Ordering.API.Application.IntegrationEvents.EventHandling
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_logger.LogWarning("----- CreateOrderCommand failed - RequestId: {RequestId}", @event.RequestId);
|
_logger.LogWarning("CreateOrderCommand failed - RequestId: {RequestId}", @event.RequestId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_logger.LogWarning("----- Invalid IntegrationEvent - RequestId is missing - {@IntegrationEvent}", @event);
|
_logger.LogWarning("Invalid IntegrationEvent - RequestId is missing - {@IntegrationEvent}", @event);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -55,7 +55,7 @@ namespace Ordering.API.Application.IntegrationEvents
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
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);
|
await _eventLogService.MarkEventAsFailedAsync(logEvt.EventId);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user