/// <summary> /// Fatals log /// </summary> /// <param name="pMethod">method</param> /// <param name="pMessage">message</param> public static void Fatal(string pMessage) { if (isDebugger()) { ILog log = Log4netUtil.GetLog(); if (log.IsFatalEnabled) { log.Fatal(pMessage); } } }
/// <summary> /// Fatals log /// </summary> /// <param name="pMethod">method</param> /// <param name="pMessage">message</param> /// <param name="Exception">ec</param> public static void Fatal(string pMessage, Exception ec) { if (isDebugger()) { ILog log = Log4netUtil.GetLog(); if (log.IsFatalEnabled) { log.Fatal(pMessage + "," + ec.ToString()); } } }
/// <summary> /// Debugging log /// </summary> /// <param name="pMethod">method.</param> /// <param name="pMessage">message.</param> public static void Debug(string pMessage) { if (isDebugger()) { ILog log = Log4netUtil.GetLog(); if (log?.IsDebugEnabled ?? false) { log.Debug(pMessage); } } }
/// <summary> /// Debugging log /// </summary> /// <param name="pMethod">method.</param> /// <param name="pMessage">message.</param> /// <param name="Exception">ec.</param> /// public static void Debug(string pMessage, Exception ec) { if (isDebugger()) { ILog log = Log4netUtil.GetLog(); if (log?.IsDebugEnabled ?? false) { log.Debug(pMessage + "," + ec.ToString()); } } }
/// <summary> /// Information log /// </summary> /// <param name="pMethod">method.</param> /// <param name="pMessage">message.</param> /// <param name="Exception">ec.</param> public static void Info(string pMessage, Exception ec) { if (isDebugger()) { ILog log = Log4netUtil.GetLog(); if (log?.IsInfoEnabled ?? false) { log.Info(pMessage + "," + ec.ToString() + Environment.NewLine); } } }
/// <summary> /// API 错误信息记录 /// </summary> /// <param name="message">错误信息</param> /// <param name="apiMethod">API接口</param> /// <param name="callMethod">所调用数据层方法</param> /// <param name="param">调用方法所传递参数</param> public static void DebugInfo(string message, string apiMethod, string callMethod, params string[] param) { if (isDebugger()) { ILog log = Log4netUtil.GetLog(); if (log?.IsDebugEnabled ?? false) { log.Info("错误信息:" + message + ",接口:" + apiMethod + "调用方法:" + callMethod + ",参数:" + string.Concat(param)); } } }
public static void Error(Exception ex) { if (isDebugger()) { ILog log = Log4netUtil.GetLog(); if (log?.IsErrorEnabled ?? false) { log.Error((ex.InnerException == null ? ex.Message : ex.InnerException.Message) + Environment.NewLine); } } }
/// <summary> /// Erros log /// </summary> /// <param name="pMethod">method.</param> /// <param name="pMessage">message.</param> public static void Error(string pMessage) { if (isDebugger()) { ILog log = Log4netUtil.GetLog(); if (log.IsErrorEnabled) { log.Error(pMessage); } } }
/// <summary> /// Information log /// </summary> /// <param name="pMethod">method.</param> /// <param name="pMessage">message.</param> public static void Info(string pMessage) { if (isDebugger()) { ILog log = Log4netUtil.GetLog(); if (log.IsInfoEnabled) { log.Info(pMessage); } } }
/// <summary> /// Warning log /// </summary> /// <param name="pMethod">method.</param> /// <param name="pMessage">message.</param> public static void Warn(string pMessage) { if (isDebugger()) { ILog log = Log4netUtil.GetLog(); if (log.IsWarnEnabled) { log.Warn(pMessage); } } }
public static void Error(Exception ex) { if (isDebugger()) { ILog log = Log4netUtil.GetLog(); if (log.IsErrorEnabled) { log.Error(ex.InnerException == null ? ex.Message : ex.InnerException.Message); } } }