Add More Verbosity and 0.1 Release

master
exsersewo 5 years ago
parent 50ed32b2a0
commit 483b0bf7f1
  1. 5
      Cachet-Monitor/Cachet-Monitor.csproj
  2. 4
      Cachet-Monitor/Program.cs

@ -4,8 +4,9 @@
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework> <TargetFramework>netcoreapp3.1</TargetFramework>
<RootNamespace>Cachet_Monitor</RootNamespace> <RootNamespace>Cachet_Monitor</RootNamespace>
<AssemblyVersion>2020.3.4.0</AssemblyVersion> <AssemblyVersion>0.1.0.0</AssemblyVersion>
<FileVersion>2020.3.4.0</FileVersion> <FileVersion>0.1.0.0</FileVersion>
<Version>0.1</Version>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

@ -58,12 +58,14 @@ namespace Cachet_Monitor
try try
{ {
await DoMonitorCheck(Cachet, monitor).ConfigureAwait(false); await DoMonitorCheck(Cachet, monitor).ConfigureAwait(false);
Log.Verbose("MainAsync", $"Ran Monitor Check for {monitor.Name}");
} }
catch (Exception ex) 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); await Task.Delay(monitor.Interval * 1000);
} }
}).Start(); }).Start();

Loading…
Cancel
Save