diff --git a/CHANGELOG.md b/CHANGELOG.md index b22c3f6..13fded2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## 1.8.4 - 2022-01-30 - Logging now more better +### New Features +* Default settings.conf have now debug=false +* ZwayDataUpdate now uses DebugLogging flag +### Bugfixes +* Fixing bug in logrotate-script +### Changes +* ProgrammLogger SetPath removed cause its done by Bot-Utils +* IniReader SetSearchPath removed, cause its done by Bot-Utils +* +* Bump Bot-Utils to ([v.1.2.6](https://git.blubbfish.net/vs_utils/Bot-Utils/src/tag/v1.2.6)) +* Bump Utils to ([v.1.6.2](https://git.blubbfish.net/vs_utils/Utils/src/tag/v1.2.6)) + ## 1.8.3 - 2022-01-20 - Shutdown working ### New Features * Deconstruction makes better Output diff --git a/Zway-Bot/Program.cs b/Zway-Bot/Program.cs index 19c2da4..a793120 100644 --- a/Zway-Bot/Program.cs +++ b/Zway-Bot/Program.cs @@ -10,10 +10,9 @@ namespace BlubbFish.IoT.Bots.ZwayBot { class Program : Bot { static void Main(String[] args) => new Program(args); - public Program(String[] _) { + public Program(String[] args) : base(args, true, "zwaybot") { Console.WriteLine("BlubbFish.IoT.Bots.ZwayBot.Program.Constructor()"); - InIReader.SetSearchPath(new List() { "/etc/zwaybot", Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\zwaybot" }); Dictionary> names = new Dictionary>(); if(InIReader.ConfigExist("names")) { foreach(String item in InIReader.GetInstance("names").GetSections(false)) { @@ -25,8 +24,6 @@ namespace BlubbFish.IoT.Bots.ZwayBot { return; } - this.logger.SetPath(InIReader.GetInstance("settings").GetValue("logging", "path")); - ZwayController zw = new ZwayController(InIReader.GetInstance("settings").GetSection("zway"), names, false); zw.Recieved += this.ZwayDataUpate; @@ -37,6 +34,7 @@ namespace BlubbFish.IoT.Bots.ZwayBot { this.Deconstructor(zw); Console.WriteLine("Bye!"); + this.Dispose(); } private void Deconstructor(ZwayController zw) { @@ -49,6 +47,10 @@ namespace BlubbFish.IoT.Bots.ZwayBot { Console.WriteLine("BlubbFish.IoT.Bots.ZwayBot.Program.Deconstructor(): Zway lib Disposed."); } - private void ZwayDataUpate(Object sender, Zway.Events.DeviceUpdateEvent e) => Console.WriteLine("-> ZW [" + e.UpdateTime + "]: " + e.Parent.ToString()); + private void ZwayDataUpate(Object sender, Zway.Events.DeviceUpdateEvent e) { + if(this.DebugLogging) { + Console.WriteLine("-> ZW [" + e.UpdateTime + "]: " + e.Parent.ToString()); + } + } } } diff --git a/Zway-Bot/Zway-Bot.csproj b/Zway-Bot/Zway-Bot.csproj index 4bc3417..bd3ace4 100644 --- a/Zway-Bot/Zway-Bot.csproj +++ b/Zway-Bot/Zway-Bot.csproj @@ -6,17 +6,18 @@ BlubbFish.IoT.Bots.ZwayBot.Program Zway-Bot Program.ZwayBot.Bots.IoT.BlubbFish - 1.8.3 + 1.8.4 de-DE Is a Bot for Zwave Devices BlubbFish BlubbFish - Copyright © BlubbFish 2017 - 20.01.2022 + Copyright © BlubbFish 2017 - 30.01.2022 LICENSE https://git.blubbfish.net/vs_projects/Zway-Bot https://git.blubbfish.net/vs_projects/Zway-Bot.git git + 1.8.4 - 2022-01-30 - Logging now more better 1.8.3 - 2022-01-20 - Shutdown working 1.8.2 - 2022-01-19 - Logging better 1.8.1 - 2022-01-18 - New Default Configs diff --git a/Zway-Bot/config-example/settings.conf b/Zway-Bot/config-example/settings.conf index 54bd5af..7f3a037 100644 --- a/Zway-Bot/config-example/settings.conf +++ b/Zway-Bot/config-example/settings.conf @@ -5,4 +5,5 @@ pass=pass type=zway [logging] -path=/var/log/zwaybot/debug.log \ No newline at end of file +path=/var/log/zwaybot/debug.log +debug=false \ No newline at end of file