Constructor PrefixedLogStream
PrefixedLogStream(Func<string>)
Initializes a new instance of the PrefixedLogStream class with the specified prefix function.
public PrefixedLogStream(Func<string> prefixFunction)
Parameters
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
prefixFunction
Func<string>A function that returns the prefix to be added to log messages.
tw
TextWriterThe 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
prefixFunction
Func<string>A function that returns the prefix to be added to log messages.
filename
stringThe 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
prefixFunction
Func<string>A function that returns the prefix to be added to log messages.
filename
stringThe name of the file to write log messages to, or
null
to write to the text writer.tw
TextWriterThe text writer to write log messages to, or
null
to write to the file.