mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-01 14:10:53 +00:00
Omit dump of configs and databases on debug builds
They only slow down debugging process
This commit is contained in:
@@ -1046,7 +1046,7 @@ namespace ArchiSteamFarm {
|
||||
return;
|
||||
}
|
||||
|
||||
if (Debugging.IsUserDebugging) {
|
||||
if (Debugging.IsDebugConfigured) {
|
||||
ASF.ArchiLogger.LogGenericDebug(configFilePath + ": " + JsonConvert.SerializeObject(botConfig, Formatting.Indented));
|
||||
}
|
||||
|
||||
@@ -1066,7 +1066,7 @@ namespace ArchiSteamFarm {
|
||||
return;
|
||||
}
|
||||
|
||||
if (Debugging.IsUserDebugging) {
|
||||
if (Debugging.IsDebugConfigured) {
|
||||
ASF.ArchiLogger.LogGenericDebug(databaseFilePath + ": " + JsonConvert.SerializeObject(botDatabase, Formatting.Indented));
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,9 @@ namespace ArchiSteamFarm {
|
||||
internal static bool IsDebugBuild => false;
|
||||
#endif
|
||||
|
||||
internal static bool IsUserDebugging => IsDebugBuild || ASF.GlobalConfig.Debug;
|
||||
internal static bool IsDebugConfigured => ASF.GlobalConfig.Debug;
|
||||
|
||||
internal static bool IsUserDebugging => IsDebugBuild || IsDebugConfigured;
|
||||
|
||||
internal sealed class DebugListener : IDebugListener {
|
||||
public void WriteLine(string category, string msg) {
|
||||
|
||||
@@ -211,7 +211,7 @@ namespace ArchiSteamFarm {
|
||||
|
||||
ASF.InitGlobalConfig(globalConfig);
|
||||
|
||||
if (Debugging.IsUserDebugging) {
|
||||
if (Debugging.IsDebugConfigured) {
|
||||
ASF.ArchiLogger.LogGenericDebug(globalConfigFile + ": " + JsonConvert.SerializeObject(ASF.GlobalConfig, Formatting.Indented));
|
||||
}
|
||||
|
||||
@@ -303,7 +303,10 @@ namespace ArchiSteamFarm {
|
||||
|
||||
// If debugging is on, we prepare debug directory prior to running
|
||||
if (Debugging.IsUserDebugging) {
|
||||
ASF.ArchiLogger.LogGenericDebug(globalDatabaseFile + ": " + JsonConvert.SerializeObject(ASF.GlobalDatabase, Formatting.Indented));
|
||||
if (!Debugging.IsDebugBuild) {
|
||||
ASF.ArchiLogger.LogGenericDebug(globalDatabaseFile + ": " + JsonConvert.SerializeObject(ASF.GlobalDatabase, Formatting.Indented));
|
||||
}
|
||||
|
||||
Logging.EnableTraceLogging();
|
||||
|
||||
DebugLog.AddListener(new Debugging.DebugListener());
|
||||
|
||||
Reference in New Issue
Block a user