From 483b0bf7f1aed334b16737751778dee4dbbf0836 Mon Sep 17 00:00:00 2001 From: exsersewo Date: Sat, 14 Mar 2020 10:57:11 +0000 Subject: [PATCH] Add More Verbosity and 0.1 Release --- Cachet-Monitor/Cachet-Monitor.csproj | 5 +++-- Cachet-Monitor/Program.cs | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Cachet-Monitor/Cachet-Monitor.csproj b/Cachet-Monitor/Cachet-Monitor.csproj index 14324a1..6bc0432 100644 --- a/Cachet-Monitor/Cachet-Monitor.csproj +++ b/Cachet-Monitor/Cachet-Monitor.csproj @@ -4,8 +4,9 @@ Exe netcoreapp3.1 Cachet_Monitor - 2020.3.4.0 - 2020.3.4.0 + 0.1.0.0 + 0.1.0.0 + 0.1 diff --git a/Cachet-Monitor/Program.cs b/Cachet-Monitor/Program.cs index 9fe3123..a2ffcc0 100644 --- a/Cachet-Monitor/Program.cs +++ b/Cachet-Monitor/Program.cs @@ -58,12 +58,14 @@ namespace Cachet_Monitor try { await DoMonitorCheck(Cachet, monitor).ConfigureAwait(false); + Log.Verbose("MainAsync", $"Ran Monitor Check for {monitor.Name}"); } catch (Exception ex) { - File.WriteAllText(Path.Combine(Environment.CurrentDirectory, "lastexception.txt"), ex.ToString()); + Log.Warning("MainAsync", $"{monitor.Name} failed with {ex.Message}", ex); } + Log.Verbose("MainAsync", $"Halting {monitor.Name} check for {monitor.Interval * 1000}ms"); await Task.Delay(monitor.Interval * 1000); } }).Start();