shrinkts log message a bit
All checks were successful
PiwigoDirectorySync/pipeline/head This commit looks good

This commit is contained in:
Philipp Häfelfinger 2023-10-04 21:01:57 +02:00
parent b340fd9e25
commit c57d43211e

View File

@ -12,7 +12,7 @@ using Serilog.Sinks.SystemConsole.Themes;
using Spectre.Console.Cli; using Spectre.Console.Cli;
const string outputTemplateConsole = "[{Timestamp:HH:mm:ss} {Level}] {SourceContext}: {Message}{NewLine}"; 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() Log.Logger = new LoggerConfiguration().MinimumLevel.Debug()
.MinimumLevel.Override("Microsoft", LogEventLevel.Warning) .MinimumLevel.Override("Microsoft", LogEventLevel.Warning)
@ -20,7 +20,7 @@ Log.Logger = new LoggerConfiguration().MinimumLevel.Debug()
.MinimumLevel.Override("Piwigo.Client", LogEventLevel.Debug) .MinimumLevel.Override("Piwigo.Client", LogEventLevel.Debug)
.Enrich.FromLogContext() .Enrich.FromLogContext()
.WriteTo.Console(LogEventLevel.Information, outputTemplateConsole, theme: AnsiConsoleTheme.Code) .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(); .CreateLogger();
var registrations = new ServiceCollection(); var registrations = new ServiceCollection();