From c6e012f4d96af4d0dbf6e2cf2f61efb3c2093bb8 Mon Sep 17 00:00:00 2001 From: Kenneth Skovhede Date: Tue, 13 Aug 2024 16:43:53 +0200 Subject: [PATCH] Using separate names for server and trayicon log files in debug mode. This is related to #5399 --- Duplicati/Server/Program.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Duplicati/Server/Program.cs b/Duplicati/Server/Program.cs index 8da009c68..58aabcac8 100644 --- a/Duplicati/Server/Program.cs +++ b/Duplicati/Server/Program.cs @@ -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"])) {