Constructor
PrefixedLogStream constructor
PrefixedLogStream(Func<string>) #
Initializes a new instance of the PrefixedLogStream class with the specified prefix function.
public PrefixedLogStream(Func<string> prefixFunction)Parameters #
A function that returns the prefix to be added to log messages.
PrefixedLogStream(Func<string>, TextWriter) #
Initializes a new instance of the PrefixedLogStream class with the specified prefix function and text writer.
public PrefixedLogStream(Func<string> prefixFunction, TextWriter tw)Parameters #
A function that returns the prefix to be added to log messages.
tw TextWriter
The text writer to write log messages to.
PrefixedLogStream(Func<string>, string) #
Initializes a new instance of the PrefixedLogStream class with the specified prefix function and file name.
public PrefixedLogStream(Func<string> prefixFunction, string filename)Parameters #
A function that returns the prefix to be added to log messages.
filename string
The name of the file to write log messages to.
PrefixedLogStream(Func<string>, string?, TextWriter?) #
Initializes a new instance of the PrefixedLogStream class with the specified prefix function, file name, and text writer.
public PrefixedLogStream(Func<string> prefixFunction, string? filename, TextWriter? tw)Parameters #
A function that returns the prefix to be added to log messages.
filename string?
The name of the file to write log messages to, or null to write to the text writer.
tw TextWriter?
The text writer to write log messages to, or null to write to the file.