예제 #1
0
        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.");
        }
예제 #2
0
파일: Program.cs 프로젝트: zkas/DebugViewPP
        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.");
        }