private static void Main(string[] args)
        {
            XmlConfigurator.Configure(new FileInfo("log4net.config"));
            LogManager.GetLogger(typeof(Program)).Info("Started");

            var url = new Uri("http://localhost:60473/");

            Err.Configuration.Credentials(url,
                                          "1a68bc3e123c48a3887877561b0982e2",
                                          "bd73436e965c4f3bb0578f57c21fde69");

            // injects into the log4net pipeline
            Err.Configuration.CatchLog4NetExceptions();

            var log = LogManager.GetLogger(typeof(Program));

            log.Info("Hello word");

            var service = new SomeService();

            service.DoSomeStuff();

            Console.WriteLine("Exception have been logged.");
            Console.ReadLine();
        }
Beispiel #2
0
        private static void Main(string[] args)
        {
            XmlConfigurator.Configure(new FileInfo("log4net.config"));
            LogManager.GetLogger(typeof(Program)).Info("Started");

            var url = new Uri("https://localhost:44393/");

            Err.Configuration.Credentials(url,
                                          "5a617e0773b94284bef33940e4bc8384",
                                          "3fab63fb846c4dd289f67b0b3340fefc");


            // injects into the log4net pipeline
            Err.Configuration.CatchLog4NetExceptions();

            var log = LogManager.GetLogger(typeof(Program));

            log.Info("Hello word");

            var service = new SomeService();

            service.DoSomeStuff();

            Console.WriteLine("Exception have been logged.");
            Console.ReadLine();
        }
Beispiel #3
0
        private static void Main(string[] args)
        {
            XmlConfigurator.Configure(new FileInfo("log4net.config"));

            var url = new Uri("http://localhost:50473/");

            Err.Configuration.Credentials(url,
                                          "13d82df603a845c7a27164c4fec19dd6",
                                          "6f0a0a7fac6d42caa7cc47bb34a6520b");

            // injects into the log4net pipeline
            Err.Configuration.CatchLog4NetExceptions();

            var log = LogManager.GetLogger(typeof(Program));

            log.Info("Hello word");

            var service = new SomeService();

            service.DoSomeStuff();

            Console.WriteLine("Exception have been logged.");
            Console.ReadLine();
        }