Ejemplo n.º 1
0
 /// <summary> Creates a new log entry based on a given log item. </summary>
 /// <param name="item"> Encapsulates logging information. </param>
 /// <exception cref="ArgumentNullException"> If <paramref name="item" /> is a null reference. </exception>
 public abstract void Write(LogItem item);
Ejemplo n.º 2
0
 /// <summary> Simple helper method which returns the formatted string representation of the submitted <see cref="LogItem" /> by invoking the <see cref="ILogItemFormatter.FormatItem" /> method of the
 ///     assigned <see cref="Formatter" />. </summary>
 /// <param name="item"> The item to be processed. </param>
 /// <returns> Formatted logging data. </returns>
 protected string FormatItem(LogItem item)
 {
     return(Formatter.FormatItem(item));
 }
Ejemplo n.º 3
0
 /// <summary> Records the given log item. </summary>
 /// <param name="item"> The item being logged. </param>
 public override void Write(LogItem item)
 {
     logItems.Add(item);
 }