Last active
September 25, 2016 16:58
-
-
Save pawlos/3a86c61a0485da693f42e0b08d7ceaf8 to your computer and use it in GitHub Desktop.
warden-example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System.Threading.Tasks; | |
| using Warden; | |
| using Warden.Core; | |
| using Warden.Watchers.Disk; | |
| using Warden.Watchers.Process; | |
| namespace KidsTravel.Monitoring | |
| { | |
| class Program | |
| { | |
| static void Main(string[] args) | |
| { | |
| var config = WardenConfiguration.Create() | |
| .AddDiskWatcher(cfg => | |
| cfg.WithPartitionsToCheck("C")) | |
| .AddProcessWatcher("node", ".") | |
| .WithConsoleLogger(Warden.Utils.WardenLoggerLevel.Info).Build(); | |
| var warden = WardenInstance.Create(config); | |
| Task.WaitAll(warden.StartAsync()); | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment