static void Main(string[] args) { DebugViewPlugin.ProcessCommandline(args); foreach (var arg in args) { if (arg.ToLower().Contains("--verbose")) { Settings.Verbose = true; } } if (args.Length < 1) { Console.WriteLine("usage: httpmonitor <url>"); return; } string url = args[0]; Console.WriteLine("Poll interval: " + Settings.PollInterval); Console.WriteLine("URL: " + url); Console.WriteLine("Monitoring..."); Log log = new Log(url); try { log.Monitor(); } catch (Exception e) { Util.DebugWrite(e.ToString()); } Util.DebugWrite("Monitoring " + url + " ended."); }
static void Main(string[] args) { DebugViewPlugin.ProcessCommandline(args); foreach (var arg in args) { if (arg.ToLower().Contains("--verbose")) { Settings.Verbose = true; } } if (args.Length < 1) { Console.WriteLine("usage: httpmonitor <url>"); return; } string url = args[0]; Console.WriteLine("Poll interval: " + Settings.PollInterval); Console.WriteLine("URL: " + url); Console.WriteLine("Monitoring..."); //Trust all certificates System.Net.ServicePointManager.ServerCertificateValidationCallback = ((sender, certificate, chain, sslPolicyErrors) => true); Log log = new Log(url); try { log.Monitor(); } catch (Exception e) { Util.DebugWrite(e.ToString()); } Util.DebugWrite("Monitoring " + url + " ended."); }