Class LogWriter.StringBuilderLogWriter
Provides a log writer implementation that writes log messages to a specified StringBuilder instance, with support for indentation.
public class LogWriter.StringBuilderLogWriter : LogWriter.CustomLogWriter, IBaseObjectWithAttr, IBaseObjectWithId, INotifyPropertyChanged, ILogWriter, IDisposableObject, IDisposable, IBaseObject
- Inheritance
-
LogWriter.StringBuilderLogWriter
- Implements
- Extension Methods
Remarks
This class is useful for scenarios where log messages need to be captured in-memory for further processing or inspection.
Constructors
- StringBuilderLogWriter()
Initializes a new instance of the LogWriter.StringBuilderLogWriter class using an empty StringBuilder instance.
- StringBuilderLogWriter(StringBuilder)
Initializes a new instance of the LogWriter.StringBuilderLogWriter class using the specified StringBuilder.
Properties
- StringBuilder
Gets the underlying StringBuilder instance used for logging.
Methods
- WriteLine(string)
Writes a message to the log, followed by a line terminator.