Using separate names for server and trayicon log files in debug mode.

This is related to #5399
This commit is contained in:
Kenneth Skovhede
2024-08-13 16:43:53 +02:00
parent dc14b2c28e
commit c6e012f4d9
+2 -1
View File
@@ -540,7 +540,8 @@ namespace Duplicati.Server
//Log various information in the logfile
if (!commandlineOptions.ContainsKey("log-file"))
{
commandlineOptions["log-file"] = System.IO.Path.Combine(StartupPath, "Duplicati.debug.log");
var prefix = System.Reflection.Assembly.GetEntryAssembly().GetName().Name.StartsWith("Duplicati.Server") ? "server" : "trayicon";
commandlineOptions["log-file"] = System.IO.Path.Combine(StartupPath, $"Duplicati-{prefix}.debug.log");
commandlineOptions["log-level"] = Duplicati.Library.Logging.LogMessageType.Profiling.ToString();
if (System.IO.File.Exists(commandlineOptions["log-file"]))
{