Example #1
0
 public void WarnException(string message, Exception exception)
 {
     if (_logger != null)
     {
         _logger.WarnException(message, exception);
     }
 }
Example #2
0
 public void Warn(object message, Exception exception)
 {
     if (IsWarnEnabled)
     {
         log.WarnException(message.ToString(), exception);
     }
 }
Example #3
0
 public void Warning(string message, Exception exc = null)
 {
     if (exc == null)
     {
         InternalLogger.Warn(message);
     }
     else
     {
         InternalLogger.WarnException(message, exc);
     }
 }
 /// <summary>
 /// writes warning, generally used for non critical error
 /// </summary>
 /// <param name="msg">additional info, optional parameter</param>
 /// <param name="e">exception, optional parameter</param>
 public void WriteToLog_Warning(string msg, Exception e)
 {
     if (!String.IsNullOrEmpty(msg) && e != null)
     {
         m_Logger.WarnException(msg, e);
     }
     else if (!String.IsNullOrEmpty(msg))
     {
         m_Logger.Warn(msg);
     }
     else if (e != null)
     {
         m_Logger.Warn(e);
     }
 }
 /// <summary>
 /// 输出错误日志 Warn 级别。
 /// </summary>
 /// <param name="msg">错误消息体</param>
 /// <param name="ex">错误类</param>
 public void Warn(object msg, Exception ex)
 {
     log4.WarnException(EncryptPassword(msg), ex);
 }
Example #6
0
 public void Warn(string message, Exception ex)
 {
     logger.WarnException(AppendInfomation(message), ex);
 }
Example #7
0
 public static void Warn(string message, Exception exception)
 {
     LogHelper.WarnException(message, exception);
 }
Example #8
0
 public void WarnException(string message, Exception exception, params object[] args)
 {
     _logger.WarnException(Format(message, args), exception);
 }