Browse Source

Use default logger

davidfowl/common-services
David Fowler 1 year ago
committed by Reuben Bond
parent
commit
9d52426a49
1 changed files with 3 additions and 7 deletions
  1. +3
    -7
      src/Services/Basket/Basket.API/Program.cs

+ 3
- 7
src/Services/Basket/Basket.API/Program.cs View File

@ -39,23 +39,19 @@ eventBus.Subscribe<OrderStartedIntegrationEvent, OrderStartedIntegrationEventHan
try
{
Log.Information("Configuring web host ({ApplicationContext})...", AppName);
app.Logger.LogInformation("Configuring web host ({ApplicationContext})...", AppName);
Log.Information("Starting web host ({ApplicationContext})...", AppName);
app.Logger.LogInformation("Starting web host ({ApplicationContext})...", AppName);
await app.RunAsync();
return 0;
}
catch (Exception ex)
{
Log.Fatal(ex, "Program terminated unexpectedly ({ApplicationContext})!", AppName);
app.Logger.LogCritical(ex, "Program terminated unexpectedly ({ApplicationContext})!", AppName);
return 1;
}
finally
{
Log.CloseAndFlush();
}
public partial class Program
{


Loading…
Cancel
Save