A log stream that writes log messages to a TextWriter. More...
Public Member Functions | |
TextWriterLogStream (TextWriter writer, bool disposeWriter, string prefix=null) | |
Initializes a new instance of the TextWriterLogStream class. More... | |
override void | Dispose () |
Disposes the TextWriterLogStream instance and optionally disposes the underlying TextWriter. More... | |
override void | Log (Exception error) |
Logs an exception. More... | |
override void | Log (ILogSource source, string message) |
Logs a message with a source. More... | |
override void | Log (ILogSource source, string message, Exception error) |
Logs a message with a source and an exception. More... | |
override void | Log (string message) |
Logs a message. More... | |
override void | Log (string message, Exception error) |
Logs a message with an exception. More... | |
Public Member Functions inherited from Quantum.LogStream | |
virtual void | Log (ILogSource source, Exception error) |
Logs a message with an exception. More... | |
A log stream that writes log messages to a TextWriter.
|
inline |
Initializes a new instance of the TextWriterLogStream class.
writer | The TextWriter to write log messages to. |
disposeWriter | If set to true , the writer will be disposed when this instance is disposed. |
prefix | An optional prefix to prepend to each log message. |
ArgumentNullException | Thrown if writer is null . |
|
inlinevirtual |
Logs a message with a source.
source | The source of the log message. |
message | The log message. |
Reimplemented from Quantum.LogStream.
|
inlinevirtual |
|
inlinevirtual |
Logs a message with a source and an exception.
source | The source of the log message. |
message | The log message. |
error | The exception to log. |
Reimplemented from Quantum.LogStream.
|
inlinevirtual |
Logs a message with an exception.
message | The log message. |
error | The exception to log. |
Reimplemented from Quantum.LogStream.
|
inlinevirtual |
|
inlinevirtual |
Disposes the TextWriterLogStream instance and optionally disposes the underlying TextWriter.
Reimplemented from Quantum.LogStream.