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")); }
//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")); }
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()); }
public static void Debug(object message) { switch (LogEngineType) { case LogEngineTypeEnum.DefaultLogger: DefaultLogger.Debug(message); break; case LogEngineTypeEnum.FlashLogger: FlashLogger.Debug(message); break; } }
// 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()); }