Lean  $LEAN_TAG$
QuantConnect.Logging.Log Class Reference

Logging management class. More...

Static Public Member Functions

static void Error (string error, bool overrideMessageFloodProtection=false)
 Log error More...
 
static void Error (Exception exception, string message=null, bool overrideMessageFloodProtection=false)
 Log error More...
 
static void Trace (string traceText, bool overrideMessageFloodProtection=false)
 Log trace More...
 
static void Trace (string format, params object[] args)
 Writes the message in normal text More...
 
static void Error (string format, params object[] args)
 Writes the message in red More...
 
static void Debug (string text, int level=1)
 Output to the console More...
 
static string VarDump (object obj, int recursion=0)
 C# Equivalent of Print_r in PHP: More...
 
static string ClearLeanPaths (string error)
 Helper method to clear undesired paths from stack traces More...
 

Properties

static ILogHandler LogHandler [get, set]
 Gets or sets the ILogHandler instance used as the global logging implementation. More...
 
static bool DebuggingEnabled [get, set]
 Global flag whether to enable debugging logging: More...
 
static string FilePath = "log.txt" [get, set]
 Global flag to specify file based log path More...
 
static int DebuggingLevel [get, set]
 Set the minimum message level: More...
 

Detailed Description

Logging management class.

Definition at line 28 of file Log.cs.

Member Function Documentation

◆ Error() [1/3]

static void QuantConnect.Logging.Log.Error ( string  error,
bool  overrideMessageFloodProtection = false 
)
static

Log error

Parameters
errorString Error
overrideMessageFloodProtectionForce sending a message, overriding the "do not flood" directive

Definition at line 75 of file Log.cs.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Error() [2/3]

static void QuantConnect.Logging.Log.Error ( Exception  exception,
string  message = null,
bool  overrideMessageFloodProtection = false 
)
static

Log error

Parameters
exceptionThe exception to be logged
messageAn optional message to be logged, if null/whitespace the messge text will be extracted
overrideMessageFloodProtectionForce sending a message, overriding the "do not flood" directive

Definition at line 109 of file Log.cs.

Here is the call graph for this function:

◆ Trace() [1/2]

static void QuantConnect.Logging.Log.Trace ( string  traceText,
bool  overrideMessageFloodProtection = false 
)
static

Log trace

Definition at line 117 of file Log.cs.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Trace() [2/2]

static void QuantConnect.Logging.Log.Trace ( string  format,
params object[]  args 
)
static

Writes the message in normal text

Definition at line 134 of file Log.cs.

Here is the call graph for this function:

◆ Error() [3/3]

static void QuantConnect.Logging.Log.Error ( string  format,
params object[]  args 
)
static

Writes the message in red

Definition at line 142 of file Log.cs.

Here is the call graph for this function:

◆ Debug()

static void QuantConnect.Logging.Log.Debug ( string  text,
int  level = 1 
)
static

Output to the console

Parameters
textThe message to show
leveldebug level

Definition at line 152 of file Log.cs.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ VarDump()

static string QuantConnect.Logging.Log.VarDump ( object  obj,
int  recursion = 0 
)
static

C# Equivalent of Print_r in PHP:

Parameters
obj
recursion
Returns

Definition at line 171 of file Log.cs.

◆ ClearLeanPaths()

static string QuantConnect.Logging.Log.ClearLeanPaths ( string  error)
static

Helper method to clear undesired paths from stack traces

Parameters
errorThe error to cleanup
Returns
The sanitized error

Definition at line 265 of file Log.cs.

Property Documentation

◆ LogHandler

ILogHandler QuantConnect.Logging.Log.LogHandler
staticgetset

Gets or sets the ILogHandler instance used as the global logging implementation.

Definition at line 41 of file Log.cs.

◆ DebuggingEnabled

bool QuantConnect.Logging.Log.DebuggingEnabled
staticgetset

Global flag whether to enable debugging logging:

Definition at line 50 of file Log.cs.

◆ FilePath

string QuantConnect.Logging.Log.FilePath = "log.txt"
staticgetset

Global flag to specify file based log path

Only valid for file based loggers

Definition at line 59 of file Log.cs.

◆ DebuggingLevel

int QuantConnect.Logging.Log.DebuggingLevel
staticgetset

Set the minimum message level:

Definition at line 65 of file Log.cs.


The documentation for this class was generated from the following file: