From 6b99d9322176556e585b080129a236c836fb960b Mon Sep 17 00:00:00 2001 From: Egezenn Date: Thu, 15 Oct 2026 12:08:34 +0300 Subject: [PATCH] Organize character logs by profile to prevent name collisions - Prepend SelectedProfile to character log folder: {SelectedProfile}-{Character} - Keeps logs separated across profiles with identical character names --- Plugins/RSBot.Log/Views/Main.cs | 6 ++++-- .../RSBot.Python/Components/API/Core/Config/API.Config.cs | 5 +++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Plugins/RSBot.Log/Views/Main.cs b/Plugins/RSBot.Log/Views/Main.cs index 32cf1bd8..5457aa45 100644 --- a/Plugins/RSBot.Log/Views/Main.cs +++ b/Plugins/RSBot.Log/Views/Main.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.ComponentModel; using System.IO; using System.Windows.Forms; @@ -50,7 +50,9 @@ public void AppendLog(string message, LogLevel level = LogLevel.Notify) Kernel.BasePath, "User", "Logs", - Game.Player == null ? "Environment" : Game.Player.Name, + Game.Player == null + ? "Environment" + : $"{RSBot.Core.Components.ProfileManager.SelectedProfile}-{Game.Player.Name}", $"{DateTime.Now:dd-MM-yyyy}.txt" ); diff --git a/Plugins/RSBot.Python/Components/API/Core/Config/API.Config.cs b/Plugins/RSBot.Python/Components/API/Core/Config/API.Config.cs index ced77b78..7e9f228a 100644 --- a/Plugins/RSBot.Python/Components/API/Core/Config/API.Config.cs +++ b/Plugins/RSBot.Python/Components/API/Core/Config/API.Config.cs @@ -1,7 +1,8 @@ -using System.IO; +using System.IO; using System.Windows.Forms; using Python.Runtime; using RSBot.Core; +using RSBot.Core.Components; using RSBot.Python.Components.API.Interface; using RSBot.Python.Views; @@ -51,7 +52,7 @@ private string GetLogPath() { return Path.Combine(projectDir, "User", "Logs"); } - return Path.Combine(projectDir, "User", "Logs", Game.Player.Name); + return Path.Combine(projectDir, "User", "Logs", $"{ProfileManager.SelectedProfile}-{Game.Player.Name}"); } public string get_config_dir()