From 7c133a799b2413c5cd5555072b67586efbf502c8 Mon Sep 17 00:00:00 2001 From: JustArchi Date: Fri, 18 May 2018 21:12:33 +0200 Subject: [PATCH] Extend debug to databases too --- ArchiSteamFarm/Bot.cs | 6 +++++- ArchiSteamFarm/Program.cs | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ArchiSteamFarm/Bot.cs b/ArchiSteamFarm/Bot.cs index bf2978311..86a9c9979 100755 --- a/ArchiSteamFarm/Bot.cs +++ b/ArchiSteamFarm/Bot.cs @@ -874,7 +874,7 @@ namespace ArchiSteamFarm { } if (Debugging.IsUserDebugging) { - ASF.ArchiLogger.LogGenericDebug(botName + ": " + JsonConvert.SerializeObject(botConfig, Formatting.Indented)); + ASF.ArchiLogger.LogGenericDebug(configFilePath + ": " + JsonConvert.SerializeObject(botConfig, Formatting.Indented)); } string databaseFilePath = botPath + SharedInfo.DatabaseExtension; @@ -885,6 +885,10 @@ namespace ArchiSteamFarm { return; } + if (Debugging.IsUserDebugging) { + ASF.ArchiLogger.LogGenericDebug(databaseFilePath + ": " + JsonConvert.SerializeObject(botDatabase, Formatting.Indented)); + } + Bot bot; await BotsSemaphore.WaitAsync().ConfigureAwait(false); diff --git a/ArchiSteamFarm/Program.cs b/ArchiSteamFarm/Program.cs index 67a6472cd..f2978bfe3 100644 --- a/ArchiSteamFarm/Program.cs +++ b/ArchiSteamFarm/Program.cs @@ -250,7 +250,7 @@ namespace ArchiSteamFarm { } if (Debugging.IsUserDebugging) { - ASF.ArchiLogger.LogGenericDebug(SharedInfo.ASF + ": " + JsonConvert.SerializeObject(GlobalConfig, Formatting.Indented)); + ASF.ArchiLogger.LogGenericDebug(SharedInfo.GlobalConfigFileName + ": " + JsonConvert.SerializeObject(GlobalConfig, Formatting.Indented)); } if (GlobalConfig.BackgroundGCPeriod > 0) { @@ -326,6 +326,10 @@ namespace ArchiSteamFarm { return; } + if (Debugging.IsUserDebugging) { + ASF.ArchiLogger.LogGenericDebug(SharedInfo.GlobalDatabaseFileName + ": " + JsonConvert.SerializeObject(GlobalDatabase, Formatting.Indented)); + } + // If debugging is on, we prepare debug directory prior to running if (GlobalConfig.Debug) { Logging.EnableTraceLogging();