Exemple #1
0
 /// <summary>
 /// 致命错误
 /// </summary>
 /// <param name="message">日志消息</param>
 /// <param name="args">参数值</param>
 public virtual void Fatal(string message, params object[] args)
 {
     LogContent.Content(message, args);
     Fatal();
 }
Exemple #2
0
 /// <summary>
 /// 警告
 /// </summary>
 /// <param name="message">日志消息</param>
 /// <param name="args">参数值</param>
 public virtual void Warn(string message, params object[] args)
 {
     LogContent.Content(message, args);
     Warn();
 }
Exemple #3
0
 /// <summary>
 /// 错误
 /// </summary>
 /// <param name="message">日志消息</param>
 /// <param name="args">参数值</param>
 public virtual void Error(string message, params object[] args)
 {
     LogContent.Content(message, args);
     Error();
 }
Exemple #4
0
 /// <summary>
 /// 信息
 /// </summary>
 /// <param name="message">日志消息</param>
 /// <param name="args">参数值</param>
 public virtual void Info(string message, params object[] args)
 {
     LogContent.Content(message, args);
     Info();
 }
Exemple #5
0
 /// <summary>
 /// 调试
 /// </summary>
 /// <param name="message">日志消息</param>
 /// <param name="args">参数值</param>
 public virtual void Debug(string message, params object[] args)
 {
     LogContent.Content(message, args);
     Debug();
 }
Exemple #6
0
 /// <summary>
 /// 跟踪
 /// </summary>
 /// <param name="message">日志消息</param>
 /// <param name="args">参数值</param>
 public virtual void Trace(string message, params object[] args)
 {
     LogContent.Content(message, args);
     Trace();
 }
Exemple #7
0
 /// <summary>
 /// 添加行
 /// </summary>
 protected void Append(StringBuilder result, LogContent content, Action <StringBuilder, LogContent> action, ref int line)
 {
     result.AppendFormat("{0}. ", line++);
     action(result, content);
 }
Exemple #8
0
 /// <summary>
 /// 添加行
 /// </summary>
 protected void AppendLine(StringBuilder result, LogContent content, Action <StringBuilder, LogContent> action, ref int line)
 {
     Append(result, content, action, ref line);
     result.AppendLine();
 }