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();