Skip to content

Commit

Permalink
Remove redundant initialization and add logger flush
Browse files Browse the repository at this point in the history
  • Loading branch information
fahminlb33 committed Feb 28, 2022
1 parent cb07400 commit 469dc85
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/KFlearning.App/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,22 +70,18 @@ static void Main()
// bootstrapper
Log.Debug("Bootstrapping application");
ApplicationConfiguration.Initialize();

Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(Container.GetRequiredService<KFlearningApplicationContext>());
}
catch (Exception e)
{
Log.Fatal("Application shutdown unexpectedly", e);
Log.CloseAndFlush();

MessageBox.Show(MessagesText.FatalShutdown, MessagesText.AppName,
MessageBoxButtons.OK, MessageBoxIcon.Error);
}
finally
{
AppExitHandler();
Log.CloseAndFlush();
}
}

Expand Down

0 comments on commit 469dc85

Please sign in to comment.