DIFF

class DebugPrintSource

Constants 4

static private const int MSG_LOG = 0
Referenced by Log(), LogAndTrace(), and OnInit()
static private const int MSG_WARNING = 1
static private const int MSG_ERROR = 2
static private const int MSG_COUNT = 3
Referenced by IsDebugLog()

Members 5

static private string s_MsgPrefix[MSG_COUNT]
Referenced by IsDebugLog(), LogMessage(), and OnInit()
static private string s_MsgStackMarkStart
Referenced by IsStackTrace(), and OnInit()
static private string s_MsgStackMarkEnd
Referenced by IsStackTrace(), and OnInit()
static private bool s_MsgStackMarked
Referenced by IsStackTrace(), and OnInit()
static private bool s_TraceAllLogs
Referenced by EnableTracingLogs(), Log(), LogError()
Show 2 more, LogWarning(), and OnInit()

Methods 14

static void OnInit()
static void Log(string msg)

Prints debug message with normal prio

msg
string Debug message for print

Returns: void None

DebugPrint.Log("Hello World");

>> [Log]: Hello World;
static void LogAndTrace(string msg)

Prints debug message as normal message and prints stack trace of calls

msg
string Debug message for print

Returns: void None

DebugPrint.LogAndTrace("Hello World, this is normal log");

>> [Log]: Hello World, this is normal log
>>		-- Stack trace --
>>   	OnKeyPress() Scripts/mission/missionGameplay.c : 230
>>   	OnKeyPress() Scripts/DayZGame.c : 346
>>   	-----------------
References LogMessage(), and MSG_LOG
static void LogWarning(string msg)

Prints debug message as warning message

msg
string Debug message for warning print

Returns: void None

DebugPrint.LogWarning("Hello World, this is warning log");

>> [Warning]: Hello World, this is warning log
static void LogWarningAndTrace(string msg)

Prints debug message as warning message and prints stack trace of calls

msg
string Debug message for warning print

Returns: void None

DebugPrint.LogWarningAndTrace("Hello World, this is warning log");

>> [Warning]: Hello World, this is warning log
>>		-- Stack trace --
>>   	OnKeyPress() Scripts/mission/missionGameplay.c : 230
>>   	OnKeyPress() Scripts/DayZGame.c : 346
>>   	-----------------
References LogMessage(), and MSG_WARNING
static void LogError(string msg)

Prints debug message as error message

msg
string Debug message for error print

Returns: void None

DebugPrint.LogError("Hello World, this is error log");

>> [Error]: Hello World, this is error log
static void LogErrorAndTrace(string msg)

Prints debug message as error message and prints stack trace of calls

msg
string Debug message for error print

Returns: void None

DebugPrint.LogErrorAndTrace("Hello World, this is error log");

>> [Error]: Hello World, this is error log
>>		-- Stack trace --
>>   	OnKeyPress() Scripts/mission/missionGameplay.c : 230
>>   	OnKeyPress() Scripts/DayZGame.c : 346
>>   	-----------------
References LogMessage(), and MSG_ERROR
static string AdjustDebugLog(string msg)

Function adjust received message for debug console (Do not use)

msg
string Message for adjust

Returns: string Adjusted Message


string msg = DebugPrint.AdjustDebugLog("s = 'Hello World, this is error log'");
DebugPrint.Log(msg);

>> Hello World, this is error log
References IsDebugLog(), IsStackTrace(), TrimDebugLog()
Show 1 more, TrimStackTrace()
static void EnableTracingLogs(bool enable)
References s_TraceAllLogs
static private bool IsDebugLog(string msg)
Referenced by AdjustDebugLog()
static private string TrimDebugLog(string msg)
Referenced by AdjustDebugLog()
static private bool IsStackTrace(string msg)
Referenced by AdjustDebugLog()
static private string TrimStackTrace(string msg)
Referenced by AdjustDebugLog()
static private void LogMessage(string msg, int msg_type, bool trace = false)