From a5c85a73bc3dffa9451695e5211a3a1a6928c4d2 Mon Sep 17 00:00:00 2001 From: JustArchi Date: Thu, 7 Jul 2016 23:36:35 +0200 Subject: [PATCH] And when being invoked during waiting too --- ArchiSteamFarm/Logging.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ArchiSteamFarm/Logging.cs b/ArchiSteamFarm/Logging.cs index 936fc97ed..4ac60495f 100644 --- a/ArchiSteamFarm/Logging.cs +++ b/ArchiSteamFarm/Logging.cs @@ -40,7 +40,7 @@ namespace ArchiSteamFarm { private static readonly ConcurrentHashSet ConsoleLoggingRules = new ConcurrentHashSet(); private static readonly Logger Logger = LogManager.GetCurrentClassLogger(); - private static bool IsUsingCustomConfiguration; + private static bool IsUsingCustomConfiguration, IsWaitingForUserInput; internal static void InitCoreLoggers() { if (LogManager.Configuration != null) { @@ -94,6 +94,8 @@ namespace ArchiSteamFarm { } internal static void OnUserInputStart() { + IsWaitingForUserInput = true; + if (ConsoleLoggingRules.Count == 0) { return; } @@ -106,6 +108,8 @@ namespace ArchiSteamFarm { } internal static void OnUserInputEnd() { + IsWaitingForUserInput = false; + if (ConsoleLoggingRules.Count == 0) { return; } @@ -199,6 +203,10 @@ namespace ArchiSteamFarm { } InitConsoleLoggers(); + + if (IsWaitingForUserInput) { + OnUserInputStart(); + } } } }