Пример #1
0
 // GET: Home
 public ActionResult Index()
 {
     Log4Net.Info(this, "信息");
     Log4Net.Debug(this, "调试");
     Log4Net.Error(this, "错误");
     Log4Net.Fatal(this, "失败");
     Log4Net.Warn(this, "警告");
     return(View());
 }
Пример #2
0
 private void TestLog4Net()
 {
     Log4Net.Debug("debug log");
     Log4Net.Info("info log");
     Log4Net.Warn("Warn log");
     Log4Net.Error("Error log");
     Log4Net.Fatal("Fatal log");
     Log4Net.DebugInfo("Debug log{0}", 2);
 }
 public void Fatal(object message)
 {
     Count(Level.Fatal); Log4Net.Fatal(message);
 }
 public void Fatal(object message, Exception exception)
 {
     Count(Level.Fatal); Log4Net.Fatal(message, exception);
 }