// GET: Home public ActionResult Index() { Log4Net.Info(this, "信息"); Log4Net.Debug(this, "调试"); Log4Net.Error(this, "错误"); Log4Net.Fatal(this, "失败"); Log4Net.Warn(this, "警告"); return(View()); }
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 Warn(object message) { Count(Level.Warn); Log4Net.Warn(message); }
public void Warn(object message, Exception exception) { Count(Level.Warn); Log4Net.Warn(message, exception); }