Quantum 3 3.0.1

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

Represents a debug log stream that supports logging to different streams. More...

Inherits IDisposable.

Public Member Functions

 DebugLogStream (LogStream innerStream, LogStream warnStream, LogStream errorStream)
 Initializes a new instance of the DebugLogStream class. More...
 
void Dispose ()
 Disposes the DebugLogStream and its underlying streams. More...
 
void Error (Exception message)
 Logs an exception to the ErrorStream. More...
 
void Error (ILogSource source, string message)
 Logs an error message with a source to the ErrorStream. More...
 
void Error (string message)
 Logs an error message to the ErrorStream. More...
 
void Exception (Exception message)
 Logs an exception to the ErrorStream. More...
 
DebugLogStream If (bool condition)
 Returns self if condition is true. More...
 
void Info (ILogSource source, string message)
 Logs an info message with a source to the InfoStream. More...
 
void Info (string message)
 Logs an info message to the InfoStream. More...
 
void Log (ILogSource source, string message)
 Logs a message with a source to the InfoStream. More...
 
void Log (string message)
 Logs a message to the InfoStream. More...
 
DebugLogStream Once (ref bool flag)
 Returns self if flag is false and then sets it to true. More...
 
void Warn (ILogSource source, string message)
 Logs a warning message with a source to the WarnStream. More...
 
void Warn (string message)
 Logs a warning message to the WarnStream. More...
 

Public Attributes

readonly LogStream ErrorStream
 Stream for logging error messages. More...
 
readonly LogStream InfoStream
 Stream for logging informational messages. More...
 
readonly LogStream WarnStream
 Stream for logging warning messages. More...
 

Detailed Description

Represents a debug log stream that supports logging to different streams.

Constructor & Destructor Documentation

◆ DebugLogStream()

Quantum.DebugLogStream.DebugLogStream ( LogStream  innerStream,
LogStream  warnStream,
LogStream  errorStream 
)
inline

Initializes a new instance of the DebugLogStream class.

Parameters
innerStreamThe stream for informational messages.
warnStreamThe stream for warning messages.
errorStreamThe stream for error messages.

Member Function Documentation

◆ Log() [1/2]

void Quantum.DebugLogStream.Log ( ILogSource  source,
string  message 
)

Logs a message with a source to the InfoStream.

◆ Log() [2/2]

void Quantum.DebugLogStream.Log ( string  message)

Logs a message to the InfoStream.

◆ Info() [1/2]

void Quantum.DebugLogStream.Info ( ILogSource  source,
string  message 
)

Logs an info message with a source to the InfoStream.

◆ Info() [2/2]

void Quantum.DebugLogStream.Info ( string  message)

Logs an info message to the InfoStream.

◆ Error() [1/3]

void Quantum.DebugLogStream.Error ( ILogSource  source,
string  message 
)

Logs an error message with a source to the ErrorStream.

◆ Error() [2/3]

void Quantum.DebugLogStream.Error ( string  message)

Logs an error message to the ErrorStream.

◆ Error() [3/3]

void Quantum.DebugLogStream.Error ( Exception  message)

Logs an exception to the ErrorStream.

◆ Exception()

void Quantum.DebugLogStream.Exception ( Exception  message)

Logs an exception to the ErrorStream.

◆ Warn() [1/2]

void Quantum.DebugLogStream.Warn ( ILogSource  source,
string  message 
)

Logs a warning message with a source to the WarnStream.

◆ Warn() [2/2]

void Quantum.DebugLogStream.Warn ( string  message)

Logs a warning message to the WarnStream.

◆ If()

DebugLogStream Quantum.DebugLogStream.If ( bool  condition)
inline

Returns self if condition is true.

◆ Once()

DebugLogStream Quantum.DebugLogStream.Once ( ref bool  flag)
inline

Returns self if flag is false and then sets it to true.

◆ Dispose()

void Quantum.DebugLogStream.Dispose ( )
inline

Disposes the DebugLogStream and its underlying streams.

Member Data Documentation

◆ InfoStream

readonly LogStream Quantum.DebugLogStream.InfoStream

Stream for logging informational messages.

◆ WarnStream

readonly LogStream Quantum.DebugLogStream.WarnStream

Stream for logging warning messages.

◆ ErrorStream

readonly LogStream Quantum.DebugLogStream.ErrorStream

Stream for logging error messages.