From 652fff7dee8e874752d610fc530f36dea72cb8bc Mon Sep 17 00:00:00 2001 From: jvyden Date: Mon, 22 Nov 2021 16:43:14 -0500 Subject: [PATCH] Add debug build warning --- ProjectLighthouse/Program.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ProjectLighthouse/Program.cs b/ProjectLighthouse/Program.cs index 418f7be3..d08f6bf0 100644 --- a/ProjectLighthouse/Program.cs +++ b/ProjectLighthouse/Program.cs @@ -53,6 +53,17 @@ namespace LBPUnion.ProjectLighthouse if (ServerSettings.Instance.InfluxLoggingEnabled) Logger.AddLogger(new InfluxLogger()); } + #if DEBUG + Logger.Log + ( + "This is a debug build. Performance may vary with a release build. " + + "If you are running Lighthouse in a production environment, " + + "it is highly recommended to run a release build. ", + LoggerLevelStartup.Instance + ); + Logger.Log("You can do so by running any dotnet command with the flag: \"-c Release\". ", LoggerLevelStartup.Instance); + #endif + stopwatch.Stop(); Logger.Log($"Ready! Startup took {stopwatch.ElapsedMilliseconds}ms. Passing off control to ASP.NET...", LoggerLevelStartup.Instance);