Debug/Release loglevel, title

This commit is contained in:
2023-08-02 08:38:18 +02:00
parent ed0abd9b6a
commit a97432e9c7
3 changed files with 16 additions and 7 deletions

View File

@@ -64,13 +64,15 @@ public static class Program
if (!Directory.Exists(logFolder)) Directory.CreateDirectory(logFolder);
Log.Logger = new LoggerConfiguration()
#if DEBUG || VERBOSE_LOGGING
.MinimumLevel.Verbose()
#endif
.Enrich.FromLogContext()
.WriteTo.File(
Path.Combine(logFolder, "appLog.log"),
fileSizeLimitBytes: 10 * 1024 * 1024,
rollOnFileSizeLimit: true,
rollingInterval: RollingInterval.Day)
rollingInterval: RollingInterval.Day,
rollOnFileSizeLimit: true)
.CreateBootstrapLogger();
}
@@ -82,9 +84,11 @@ public static class Program
{
#if DEBUG
InitDevelopment();
#else
InitRelease();
#endif
if (AppDataRoot is null)
{
InitRelease();
}
InitLogging();
Log.Logger.Information("Early app starting...");