Exemplo n.º 1
0
        public void TestWriteLog()
        {
            FlashLogger.Instance().Register();

            FlashLogger.Debug("Debug");
            FlashLogger.Debug("Debug", new Exception("testexception"));
            FlashLogger.Info("Info");
            FlashLogger.Fatal("Fatal");
            FlashLogger.Error("Error");
            FlashLogger.Warn("Warn", new Exception("testexception"));
        }
Exemplo n.º 2
0
        //http://www.cnblogs.com/emrys5/p/6693454.html
        static void Main(string[] args)
        {
            FlashLogger.Instance().Register();

            FlashLogger.Debug("Debug");
            FlashLogger.Debug("Debug", new Exception("testexception"));
            FlashLogger.Info("Info");
            FlashLogger.Fatal("Fatal");
            FlashLogger.Error("Error");
            FlashLogger.Warn("Warn", new Exception("testexception"));
        }
Exemplo n.º 3
0
        public ActionResult Index()
        {
            ViewBag.Message = "Modify this template to jump-start your ASP.NET MVC application.";
            FlashLogger.Debug("Debug");
            FlashLogger.Debug("Debug", new Exception("testexception"));
            FlashLogger.Info("Info");
            FlashLogger.Fatal("Fatal");
            FlashLogger.Error("Error");
            FlashLogger.Warn("Warn", new Exception("testexception"));

            return(View());
        }
Exemplo n.º 4
0
        public static void Debug(object message)
        {
            switch (LogEngineType)
            {
            case LogEngineTypeEnum.DefaultLogger:
                DefaultLogger.Debug(message);
                break;

            case LogEngineTypeEnum.FlashLogger:
                FlashLogger.Debug(message);
                break;
            }
        }
Exemplo n.º 5
0
        // GET: LogTest
        public ActionResult T()
        {
            Stopwatch stopwatch = new Stopwatch();

            stopwatch.Start();
            for (int i = 0; i < 100000; i++)
            {
                FlashLogger.Debug("Debug", new Exception(string.Concat("testexception", i)));
            }
            stopwatch.Stop();
            double milliseconds = stopwatch.Elapsed.TotalMilliseconds;

            ViewBag.milliseconds = milliseconds;
            return(View());
        }