Skip to content

Commit dfc680e

Browse files
committed
Fix naming inconsistency
1 parent 405e5be commit dfc680e

29 files changed

Lines changed: 51 additions & 51 deletions

File tree

src/Services/Basket/Basket.API/Controllers/BasketController.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,13 @@ public async Task<ActionResult> CheckoutAsync([FromBody]BasketCheckout basketChe
8080
// order creation process
8181
try
8282
{
83-
_logger.LogInformation("----- Publishing integration event: {IntegrationEventId} from {AppShortName} - ({@IntegrationEvent})", eventMessage.Id, Program.AppShortName, eventMessage);
83+
_logger.LogInformation("----- Publishing integration event: {IntegrationEventId} from {ShortAppName} - ({@IntegrationEvent})", eventMessage.Id, Program.ShortAppName, eventMessage);
8484

8585
_eventBus.Publish(eventMessage);
8686
}
8787
catch (Exception ex)
8888
{
89-
_logger.LogError(ex, "----- ERROR Publishing integration event: {IntegrationEventId} from {AppShortName}", eventMessage.Id, Program.AppShortName);
89+
_logger.LogError(ex, "----- ERROR Publishing integration event: {IntegrationEventId} from {ShortAppName}", eventMessage.Id, Program.ShortAppName);
9090

9191
throw;
9292
}

src/Services/Basket/Basket.API/IntegrationEvents/EventHandling/OrderStartedIntegrationEventHandler.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ public OrderStartedIntegrationEventHandler(
2424

2525
public async Task Handle(OrderStartedIntegrationEvent @event)
2626
{
27-
using (LogContext.PushProperty("IntegrationEventContext", $"{@event.Id}-{Program.AppShortName}"))
27+
using (LogContext.PushProperty("IntegrationEventContext", $"{@event.Id}-{Program.ShortAppName}"))
2828
{
29-
_logger.LogInformation("----- Handling integration event: {IntegrationEventId} at {AppShortName} - ({@IntegrationEvent})", @event.Id, Program.AppShortName, @event);
29+
_logger.LogInformation("----- Handling integration event: {IntegrationEventId} at {ShortAppName} - ({@IntegrationEvent})", @event.Id, Program.ShortAppName, @event);
3030

3131
await _repository.DeleteBasketAsync(@event.UserId.ToString());
3232
}

src/Services/Basket/Basket.API/IntegrationEvents/EventHandling/ProductPriceChangedIntegrationEventHandler.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ public ProductPriceChangedIntegrationEventHandler(
2424

2525
public async Task Handle(ProductPriceChangedIntegrationEvent @event)
2626
{
27-
using (LogContext.PushProperty("IntegrationEventContext", $"{@event.Id}-{Program.AppShortName}"))
27+
using (LogContext.PushProperty("IntegrationEventContext", $"{@event.Id}-{Program.ShortAppName}"))
2828
{
29-
_logger.LogInformation("----- Handling integration event: {IntegrationEventId} at {AppShortName} - ({@IntegrationEvent})", @event.Id, Program.AppShortName, @event);
29+
_logger.LogInformation("----- Handling integration event: {IntegrationEventId} at {ShortAppName} - ({@IntegrationEvent})", @event.Id, Program.ShortAppName, @event);
3030

3131
var userIds = _repository.GetUsers();
3232

src/Services/Basket/Basket.API/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API
1313
public class Program
1414
{
1515
public static readonly string AppName = typeof(Program).Namespace;
16-
public static readonly string AppShortName = AppName.Substring(AppName.LastIndexOf('.', AppName.LastIndexOf('.') - 1) + 1);
16+
public static readonly string ShortAppName = AppName.Substring(AppName.LastIndexOf('.', AppName.LastIndexOf('.') - 1) + 1);
1717

1818
public static int Main(string[] args)
1919
{

src/Services/Catalog/Catalog.API/IntegrationEvents/CatalogIntegrationEventService.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,15 @@ public async Task PublishThroughEventBusAsync(IntegrationEvent evt)
3939
{
4040
try
4141
{
42-
_logger.LogInformation("----- Publishing integration event: {IntegrationEventId_published} from {AppShortName} - ({@IntegrationEvent})", evt.Id, Program.AppShortName, evt);
42+
_logger.LogInformation("----- Publishing integration event: {IntegrationEventId_published} from {ShortAppName} - ({@IntegrationEvent})", evt.Id, Program.ShortAppName, evt);
4343

4444
await _eventLogService.MarkEventAsInProgressAsync(evt.Id);
4545
_eventBus.Publish(evt);
4646
await _eventLogService.MarkEventAsPublishedAsync(evt.Id);
4747
}
4848
catch (Exception ex)
4949
{
50-
_logger.LogError(ex, "----- ERROR Publishing integration event: {IntegrationEventId} from {AppShortName} - ({@IntegrationEvent})", evt.Id, Program.AppShortName, evt);
50+
_logger.LogError(ex, "----- ERROR Publishing integration event: {IntegrationEventId} from {ShortAppName} - ({@IntegrationEvent})", evt.Id, Program.ShortAppName, evt);
5151
await _eventLogService.MarkEventAsFailedAsync(evt.Id);
5252
}
5353
}

src/Services/Catalog/Catalog.API/IntegrationEvents/EventHandling/OrderStatusChangedToAwaitingValidationIntegrationEventHandler.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ public OrderStatusChangedToAwaitingValidationIntegrationEventHandler(
3030

3131
public async Task Handle(OrderStatusChangedToAwaitingValidationIntegrationEvent @event)
3232
{
33-
using (LogContext.PushProperty("IntegrationEventContext", $"{@event.Id}-{Program.AppShortName}"))
33+
using (LogContext.PushProperty("IntegrationEventContext", $"{@event.Id}-{Program.ShortAppName}"))
3434
{
35-
_logger.LogInformation("----- Handling integration event: {IntegrationEventId} at {AppShortName} - ({@IntegrationEvent})", @event.Id, Program.AppShortName, @event);
35+
_logger.LogInformation("----- Handling integration event: {IntegrationEventId} at {ShortAppName} - ({@IntegrationEvent})", @event.Id, Program.ShortAppName, @event);
3636

3737
var confirmedOrderStockItems = new List<ConfirmedOrderStockItem>();
3838

src/Services/Catalog/Catalog.API/IntegrationEvents/EventHandling/OrderStatusChangedToPaidIntegrationEventHandler.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ public OrderStatusChangedToPaidIntegrationEventHandler(
2323

2424
public async Task Handle(OrderStatusChangedToPaidIntegrationEvent @event)
2525
{
26-
using (LogContext.PushProperty("IntegrationEventContext", $"{@event.Id}-{Program.AppShortName}"))
26+
using (LogContext.PushProperty("IntegrationEventContext", $"{@event.Id}-{Program.ShortAppName}"))
2727
{
28-
_logger.LogInformation("----- Handling integration event: {IntegrationEventId} at {AppShortName} - ({@IntegrationEvent})", @event.Id, Program.AppShortName, @event);
28+
_logger.LogInformation("----- Handling integration event: {IntegrationEventId} at {ShortAppName} - ({@IntegrationEvent})", @event.Id, Program.ShortAppName, @event);
2929

3030
//we're not blocking stock/inventory
3131
foreach (var orderStockItem in @event.OrderStockItems)

src/Services/Catalog/Catalog.API/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ namespace Microsoft.eShopOnContainers.Services.Catalog.API
1515
public class Program
1616
{
1717
public static readonly string AppName = typeof(Program).Namespace;
18-
public static readonly string AppShortName = AppName.Substring(AppName.LastIndexOf('.', AppName.LastIndexOf('.') - 1) + 1);
18+
public static readonly string ShortAppName = AppName.Substring(AppName.LastIndexOf('.', AppName.LastIndexOf('.') - 1) + 1);
1919

2020
public static int Main(string[] args)
2121
{

src/Services/Location/Locations.API/Infrastructure/Services/LocationsService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ private void PublishNewUserLocationPositionIntegrationEvent(string userId, List<
7373
var newUserLocations = MapUserLocationDetails(newLocations);
7474
var @event = new UserLocationUpdatedIntegrationEvent(userId, newUserLocations);
7575

76-
_logger.LogInformation("----- Publishing integration event: {IntegrationEventId} from {AppShortName} - ({@IntegrationEvent})", @event.Id, Program.ShortAppName, @event);
76+
_logger.LogInformation("----- Publishing integration event: {IntegrationEventId} from {ShortAppName} - ({@IntegrationEvent})", @event.Id, Program.ShortAppName, @event);
7777

7878
_eventBus.Publish(@event);
7979
}

src/Services/Marketing/Marketing.API/IntegrationEvents/Handlers/UserLocationUpdatedIntegrationEventHandler.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ public UserLocationUpdatedIntegrationEventHandler(
2626

2727
public async Task Handle(UserLocationUpdatedIntegrationEvent @event)
2828
{
29-
using (LogContext.PushProperty("IntegrationEventContext", $"{@event.Id}-{Program.AppShortName}"))
29+
using (LogContext.PushProperty("IntegrationEventContext", $"{@event.Id}-{Program.ShortAppName}"))
3030
{
31-
_logger.LogInformation("----- Handling integration event: {IntegrationEventId} at {AppShortName} - ({@IntegrationEvent})", @event.Id, Program.AppShortName, @event);
31+
_logger.LogInformation("----- Handling integration event: {IntegrationEventId} at {ShortAppName} - ({@IntegrationEvent})", @event.Id, Program.ShortAppName, @event);
3232

3333
var userMarketingData = await _marketingDataRepository.GetAsync(@event.UserId);
3434
userMarketingData = userMarketingData ??

0 commit comments

Comments
 (0)