From c57d43211e00078f9776c1c8ce1036ea90c91440 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20H=C3=A4felfinger?= Date: Wed, 4 Oct 2023 21:01:57 +0200 Subject: [PATCH] shrinkts log message a bit --- PiwigoDirectorySync/Program.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PiwigoDirectorySync/Program.cs b/PiwigoDirectorySync/Program.cs index 1d2401c..aaaf526 100644 --- a/PiwigoDirectorySync/Program.cs +++ b/PiwigoDirectorySync/Program.cs @@ -12,7 +12,7 @@ using Serilog.Sinks.SystemConsole.Themes; using Spectre.Console.Cli; const string outputTemplateConsole = "[{Timestamp:HH:mm:ss} {Level}] {SourceContext}: {Message}{NewLine}"; -const string outputTemplateFile = "[{Timestamp:HH:mm:ss} {Level}] {SourceContext}{NewLine}{Message}{NewLine}{NewLine}{Exception}{NewLine}"; +const string outputTemplateFile = "[{Timestamp:HH:mm:ss} {Level}] {SourceContext}: {Message} {Exception}{NewLine}"; Log.Logger = new LoggerConfiguration().MinimumLevel.Debug() .MinimumLevel.Override("Microsoft", LogEventLevel.Warning) @@ -20,7 +20,7 @@ Log.Logger = new LoggerConfiguration().MinimumLevel.Debug() .MinimumLevel.Override("Piwigo.Client", LogEventLevel.Debug) .Enrich.FromLogContext() .WriteTo.Console(LogEventLevel.Information, outputTemplateConsole, theme: AnsiConsoleTheme.Code) - .WriteTo.File("logs/PiwigoDirectorySync.txt", LogEventLevel.Debug, outputTemplateFile, rollingInterval: RollingInterval.Day, retainedFileCountLimit: 90) + .WriteTo.File("logs/PiwigoDirectorySync.txt", LogEventLevel.Debug, outputTemplateFile, rollingInterval: RollingInterval.Day, retainedFileCountLimit: 60) .CreateLogger(); var registrations = new ServiceCollection();