Class LogWriter.MultiLogWriter
Provides a mechanism to write log messages to multiple ILogWriter instances.
public class LogWriter.MultiLogWriter : LogWriter.BaseLogWriter, IBaseObjectWithAttr, IBaseObjectWithId, INotifyPropertyChanged, ILogWriter, IDisposableObject, IDisposable, IBaseObject
- Inheritance
-
LogWriter.MultiLogWriter
- Implements
- Extension Methods
Remarks
The LogWriter.MultiLogWriter class allows you to aggregate multiple log writers and forward log messages to all of them. This is useful when you need to log messages to multiple destinations simultaneously, such as a file, console, or remote logging service.
Constructors
- MultiLogWriter(params ILogWriter[])
Initializes a new instance of the LogWriter.MultiLogWriter class with the specified log writers.
Properties
- Writers
Gets the collection of log writers used to process log entries.
Methods
- Add(ILogWriter)
Adds a log writer to the collection of writers.
- Add(Func<ILogWriter>)
Adds a log writer factory function to the collection of log writers.
- Indent()
Increases the indentation level for subsequent log messages.
- Unindent()
Decreases the indentation level for subsequent log messages.
- WriteLine(string)
Writes a message to the log, followed by a line terminator.