Photon Quantum 3.0.0

Public Member Functions | List of all members
Quantum.ConsoleLogStream Class Reference

A log stream that writes log messages to the console with a specified color. More...

Inheritance diagram for Quantum.ConsoleLogStream:
Quantum.TextWriterLogStream Quantum.LogStream

Public Member Functions

 ConsoleLogStream (ConsoleColor color, string prefix=null)
 Initializes a new instance of the ConsoleLogStream class. 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...
 
- Public Member Functions inherited from Quantum.TextWriterLogStream
 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...
 

Detailed Description

A log stream that writes log messages to the console with a specified color.

Constructor & Destructor Documentation

◆ ConsoleLogStream()

Quantum.ConsoleLogStream.ConsoleLogStream ( ConsoleColor  color,
string  prefix = null 
)
inline

Initializes a new instance of the ConsoleLogStream class.

Parameters
colorThe console color to use for log messages.
prefixAn optional prefix to prepend to each log message.

Member Function Documentation

◆ Log() [1/2]

override void Quantum.ConsoleLogStream.Log ( ILogSource  source,
string  message 
)
inlinevirtual

Logs a message with a source.

Parameters
sourceThe source of the log message.
messageThe log message.

Reimplemented from Quantum.LogStream.

◆ Log() [2/2]

override void Quantum.ConsoleLogStream.Log ( ILogSource  source,
string  message,
Exception  error 
)
inlinevirtual

Logs a message with a source and an exception.

Parameters
sourceThe source of the log message.
messageThe log message.
errorThe exception to log.

Reimplemented from Quantum.LogStream.