/// <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> /// <param name="message">日志消息</param> public virtual void Fatal(string message) { LogContent.Content(message); Fatal(); }
/// <summary> /// 添加行 /// </summary> protected void AppendLine(StringBuilder result, LogContent content, Action <StringBuilder, LogContent> action, ref int line) { Append(result, content, action, ref line); result.AppendLine(); }
/// <summary> /// 警告 /// </summary> /// <param name="message">日志消息</param> public virtual void Warn(string message) { LogContent.Content(message); Warn(); }
/// <summary> /// 错误 /// </summary> /// <param name="message">日志消息</param> public virtual void Error(string message) { LogContent.Content(message); Error(); }
/// <summary> /// 调试 /// </summary> /// <param name="message">日志消息</param> public virtual void Debug(string message) { LogContent.Content(message); Debug(); }
/// <summary> /// 信息 /// </summary> /// <param name="message">日志消息</param> public virtual void Info(string message) { LogContent.Content(message); Info(); }
public void Write(LogContent logDoc) { _localLogQueue.Enqueue(logDoc); }
/// <summary> /// 跟踪 /// </summary> /// <param name="message">日志消息</param> public virtual void Trace(string message) { LogContent.Content(message); Trace(); }
/// <summary> /// 致命错误 /// </summary> /// <param name="message">日志消息</param> /// <param name="args">参数值</param> public virtual void Fatal(string message, params object[] args) { LogContent.Content(message, args); Fatal(); }
public void Debug(string title, string content, IDictionary <string, Tag> tags) { LogContent logContent = LogContent.CreateLog(LogLevelEnum.Debug, _logProvider, title, content, tags); LogHost.Instance.Write(logContent); }
/// <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 Warn(string message, params object[] args) { LogContent.Content(message, args); Warn(); }
/// <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(); }