/// <summary> /// 添加一个日志记录器。 /// </summary> /// <param name="writer"></param> public void AddLogWriter(LogWriter writer) { lock (mWriters) { mWriters.Add(writer); if (!writer.IsPrepared) writer.Prepare(); } }
/// <summary> /// 删除一个日志记录器。如果本来就不存在,不会产生错误。 /// </summary> public void RemoveWriter(LogWriter writer) { lock (mWriters) { mWriters.Remove(writer); } }