Class PrefixedLogStream
Represents a log stream that prefixes log messages with a custom string.
public sealed class PrefixedLogStream : LogStream, IDisposable
- Inheritance
-
PrefixedLogStream
- Implements
- Inherited Members
Constructors
- PrefixedLogStream(Func<string>)
Initializes a new instance of the PrefixedLogStream class with the specified prefix function.
- PrefixedLogStream(Func<string>, TextWriter)
Initializes a new instance of the PrefixedLogStream class with the specified prefix function and text writer.
- PrefixedLogStream(Func<string>, string)
Initializes a new instance of the PrefixedLogStream class with the specified prefix function and file name.
- PrefixedLogStream(Func<string>, string?, TextWriter?)
Initializes a new instance of the PrefixedLogStream class with the specified prefix function, file name, and text writer.
Properties
- PrefixFunction
Gets or sets a function that returns the prefix to be added to log messages.
Methods
- WriteLineInternal(string)
Represents the method that intercepts the line that will be written to an output log before being queued for writing.
- WriteLineInternalAsync(string)
Represents the asynchronous method that intercepts the line that will be written to an output log before being queued for writing.