Esempio n. 1
0
 /// <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);
         }
     }
 }
Esempio n. 2
0
 /// <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());
         }
     }
 }
Esempio n. 3
0
 /// <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);
         }
     }
 }
Esempio n. 4
0
 /// <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());
         }
     }
 }
Esempio n. 5
0
 /// <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);
         }
     }
 }
Esempio n. 6
0
 /// <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));
         }
     }
 }
Esempio n. 7
0
 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);
         }
     }
 }
Esempio n. 8
0
 /// <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);
         }
     }
 }
Esempio n. 9
0
 /// <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);
         }
     }
 }
Esempio n. 10
0
 /// <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);
         }
     }
 }
Esempio n. 11
0
 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);
         }
     }
 }