From 1745f0181c0fdb4119c072f45bcfeb3af7b9132b Mon Sep 17 00:00:00 2001 From: Bond_009 Date: Sun, 29 Sep 2019 00:29:28 +0200 Subject: [PATCH] Log startup time --- Jellyfin.Server/Program.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Jellyfin.Server/Program.cs b/Jellyfin.Server/Program.cs index 6f1c111c6d..3ab19769a1 100644 --- a/Jellyfin.Server/Program.cs +++ b/Jellyfin.Server/Program.cs @@ -84,6 +84,8 @@ namespace Jellyfin.Server private static async Task StartApp(StartupOptions options) { + var stopWatch = new Stopwatch(); + stopWatch.Start(); ServerApplicationPaths appPaths = CreateApplicationPaths(options); // $JELLYFIN_LOG_DIR needs to be set for the logger configuration manager @@ -168,6 +170,10 @@ namespace Jellyfin.Server await appHost.RunStartupTasksAsync().ConfigureAwait(false); + stopWatch.Stop(); + + _logger.LogInformation("Startup complete {Time:g}", stopWatch.Elapsed); + // Block main thread until shutdown await Task.Delay(-1, _tokenSource.Token).ConfigureAwait(false); }