Ejemplo n.º 1
0
        /// <summary>
        /// Remove the exist log recorder in the recorder list.
        /// Return false if the recorder not found.
        /// </summary>
        /// <param name="recorder">The recorder that you want to remove</param>
        /// <returns>A boolean value that represent if the recorder is removed</returns>
        public bool RemoveRecorder(LogRecorder recorder)
        {
            if (recorder == null) return false;

            return _recorders.Remove(recorder);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Add and regester a new log recorder into the recorder list.
        /// </summary>
        /// <param name="recorder">The new log recorder</param>
        public void AddRecorder(LogRecorder recorder)
        {
            if (recorder == null) return;

            _recorders.Add(recorder);
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Set the recorder of the special level.
 /// </summary>
 /// <param name="level">The special log level</param>
 /// <param name="recoder">The recorder of the special level to set. 
 /// Set null if you want to remove the recorder.</param>
 public void SetRecorder(LogLevel level, LogRecorder recoder)
 {
     _recorders[(int)level] = recoder;
     _recorderSet.Add(recoder);
 }