From 24a435c9654f6e747b854385cee80e3edc7c1b15 Mon Sep 17 00:00:00 2001 From: Neil Dorin Date: Wed, 17 Feb 2021 10:18:19 -0700 Subject: [PATCH 1/3] Prevents join map info from printing on program start (JoinMapBaseAdvanced constructor) unless debug level is > 0 --- .../PepperDashEssentialsBase/JoinMaps/JoinMapBase.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/JoinMaps/JoinMapBase.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/JoinMaps/JoinMapBase.cs index b9825749..aa8e2e6d 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/JoinMaps/JoinMapBase.cs +++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/JoinMaps/JoinMapBase.cs @@ -233,7 +233,10 @@ namespace PepperDash.Essentials.Core } - PrintJoinMapInfo(); + if (Debug.Level > 0) + { + PrintJoinMapInfo(); + } } /// From bc548563923aabbb8e3a6a6379b3727ad38409cc Mon Sep 17 00:00:00 2001 From: Neil Dorin Date: Wed, 17 Feb 2021 11:27:07 -0700 Subject: [PATCH 2/3] #542 Updates log level for error messages when constructing devices --- PepperDashEssentials/ControlSystem.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PepperDashEssentials/ControlSystem.cs b/PepperDashEssentials/ControlSystem.cs index 3e3798a4..5df5c1a2 100644 --- a/PepperDashEssentials/ControlSystem.cs +++ b/PepperDashEssentials/ControlSystem.cs @@ -383,11 +383,11 @@ namespace PepperDash.Essentials if (newDev != null) DeviceManager.AddDevice(newDev); else - Debug.Console(0, Debug.ErrorLogLevel.Notice, "ERROR: Cannot load unknown device type '{0}', key '{1}'.", devConf.Type, devConf.Key); + Debug.Console(0, Debug.ErrorLogLevel.Error, "ERROR: Cannot load unknown device type '{0}', key '{1}'.", devConf.Type, devConf.Key); } catch (Exception e) { - Debug.Console(0, Debug.ErrorLogLevel.Notice, "ERROR: Creating device {0}. Skipping device. \r{1}", devConf.Key, e); + Debug.Console(0, Debug.ErrorLogLevel.Error, "ERROR: Creating device {0}. Skipping device. \r{1}", devConf.Key, e); } } Debug.Console(0, Debug.ErrorLogLevel.Notice, "All Devices Loaded."); From 70204801595cca8e9a6737c2f6126fbc02293ea1 Mon Sep 17 00:00:00 2001 From: Neil Dorin Date: Wed, 17 Feb 2021 11:44:33 -0700 Subject: [PATCH 3/3] Moves console messages about adding factory methods to level 1 --- .../PepperDashEssentialsBase/Factory/DeviceFactory.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Factory/DeviceFactory.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Factory/DeviceFactory.cs index e337b7d4..3f38e2d5 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Factory/DeviceFactory.cs +++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Factory/DeviceFactory.cs @@ -67,13 +67,13 @@ namespace PepperDash.Essentials.Core /// public static void AddFactoryForType(string typeName, Func method) { - Debug.Console(0, Debug.ErrorLogLevel.Notice, "Adding factory method for type '{0}'", typeName); + Debug.Console(1, Debug.ErrorLogLevel.Notice, "Adding factory method for type '{0}'", typeName); DeviceFactory.FactoryMethods.Add(typeName, new DeviceFactoryWrapper() { FactoryMethod = method}); } public static void AddFactoryForType(string typeName, string description, CType cType, Func method) { - Debug.Console(0, Debug.ErrorLogLevel.Notice, "Adding factory method for type '{0}'", typeName); + Debug.Console(1, Debug.ErrorLogLevel.Notice, "Adding factory method for type '{0}'", typeName); if(FactoryMethods.ContainsKey(typeName)) {