Update traces templates

This commit is contained in:
Miguel Veloso 2019-02-22 15:10:18 +00:00
parent 63a325e92e
commit 7dbab01b44
6 changed files with 7 additions and 7 deletions

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;
}

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);
}
}

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;
}

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));

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);
}
}
}

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);
}