예제 #1
0
        private void Logs()
        {
            Logger2 logger2 = new Logger2("MyLogger", LogMode.CURRENT_FOLDER, AlertMode.CONSOLE);

            //logger2.Log("bonjour", "mon message");
            //logger2.Log(new Exception("New Exception message"),"Error occured");

            Task.Factory.StartNew(() =>
            {
                int i = 0;
                while (true)
                {
                    Task.Factory.StartNew(() =>
                    {
                        try
                        {
                            this.clientView.UCClient.clientBillTxtB.Text = "hey";
                        }
                        catch (Exception e)
                        {
                            logger2.Log("error :" + i);
                            i++;
                        }
                    });
                }
            });


            //Logger logger = new Logger();
            //logger.Log("Default logger welcome");
            //logger.Log("With temp options", LogMode.CONSOLE);

            //Logger logger1 = new Logger("MyLogger", LogMode.CONSOLE, AlertMode.CONSOLE);
            //logger1.Log("Welcome from custom logger");

            //Logger logger2 = new Logger();
            //logger2.Log("With temp options", LogMode.CONSOLE, AlertMode.MESSAGE_BOX);

            //Logger logger3 = new Logger("overlay",LogMode.CONSOLE, AlertMode.OVERLAY);
            //for (int i = 0; i < 4; i++)
            //{
            //    logger3.Log("First one");
            //    logger3.Log("Second one ");
            //}

            //Logger logger4 = new Logger("current folder", LogMode.CURRENT_FOLDER, AlertMode.OVERLAY);
            //logger4.Log("logger 4 to current folder");
            //Task.Factory.StartNew(() =>
            //{
            //    for (int i = 0; i < 1000000000; i++)
            //    {
            //        logger4.Log("next reported lognext reported lognext reported lognext reported lognext reported lognext reported lognext reported lognext reported lognext");
            //    }
            //});

            //logger4.Log("other");
        }