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