Use default logger
This commit is contained in:
parent
57a93f63f0
commit
9d52426a49
@ -39,23 +39,19 @@ eventBus.Subscribe<OrderStartedIntegrationEvent, OrderStartedIntegrationEventHan
|
|||||||
|
|
||||||
try
|
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();
|
await app.RunAsync();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
Log.Fatal(ex, "Program terminated unexpectedly ({ApplicationContext})!", AppName);
|
app.Logger.LogCritical(ex, "Program terminated unexpectedly ({ApplicationContext})!", AppName);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
finally
|
|
||||||
{
|
|
||||||
Log.CloseAndFlush();
|
|
||||||
}
|
|
||||||
|
|
||||||
public partial class Program
|
public partial class Program
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user