Skip to content

Commit

Permalink
feat: 在日志显示版本号
Browse files Browse the repository at this point in the history
  • Loading branch information
HelloWRC committed Sep 30, 2024
1 parent f20bdb3 commit 19314b6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ClassIsland/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,7 @@ private async void App_OnStartup(object sender, StartupEventArgs e)
PluginService.InitializePlugins(context, services);
}).Build();
Logger = GetService<ILogger<App>>();
Logger.LogInformation("ClassIsland {}", AppVersionLong);
var lifetime = IAppHost.GetService<IHostApplicationLifetime>();
lifetime.ApplicationStarted.Register(() => Logger.LogInformation("App started."));
lifetime.ApplicationStopping.Register(() => Logger.LogInformation("App stopping."));
Expand Down

0 comments on commit 19314b6

Please sign in to comment.