PC Stable Documentation
 
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Loading...
Searching...
No Matches
DebugPrint Class Reference

Static Private Member Functions

static void OnInit ()
 
static void Log (string msg)
 Prints debug message with normal prio.
 
static void LogAndTrace (string msg)
 Prints debug message as normal message and prints stack trace of calls.
 
static void LogWarning (string msg)
 Prints debug message as warning message.
 
static void LogWarningAndTrace (string msg)
 Prints debug message as warning message and prints stack trace of calls.
 
static void LogError (string msg)
 Prints debug message as error message.
 
static void LogErrorAndTrace (string msg)
 Prints debug message as error message and prints stack trace of calls.
 
static string AdjustDebugLog (string msg)
 Function adjust received message for debug console (Do not use)
 
static void EnableTracingLogs (bool enable)
 
static private bool IsDebugLog (string msg)
 
static private string TrimDebugLog (string msg)
 
static private bool IsStackTrace (string msg)
 
static private string TrimStackTrace (string msg)
 
static private void LogMessage (string msg, int msg_type, bool trace=false)
 

Static Private Attributes

static private const int MSG_LOG = 0
 
static private const int MSG_WARNING = 1
 
static private const int MSG_ERROR = 2
 
static private const int MSG_COUNT = 3
 
static private string s_MsgPrefix [MSG_COUNT]
 
static private string s_MsgStackMarkStart
 
static private string s_MsgStackMarkEnd
 
static private bool s_MsgStackMarked
 
static private bool s_TraceAllLogs
 

Member Function Documentation

◆ AdjustDebugLog()

static string AdjustDebugLog ( string  msg)
inlinestaticprivate

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

Parameters
msgstring Message for adjust
Returns
string Adjusted Message
string msg = DebugPrint.AdjustDebugLog("s = 'Hello World, this is error log'");
>> Hello World, this is error log
Definition DebugPrint.c:2
static string AdjustDebugLog(string msg)
Function adjust received message for debug console (Do not use)
Definition DebugPrint.c:141
static void Log(string msg)
Prints debug message with normal prio.
Definition DebugPrint.c:37
Definition World.c:2

References IsDebugLog(), IsStackTrace(), TrimDebugLog(), and TrimStackTrace().

◆ EnableTracingLogs()

static void EnableTracingLogs ( bool  enable)
inlinestaticprivate

References s_TraceAllLogs.

◆ IsDebugLog()

static private bool IsDebugLog ( string  msg)
inlinestaticprivate

References string::IndexOf(), MSG_COUNT, and s_MsgPrefix.

Referenced by AdjustDebugLog().

◆ IsStackTrace()

static private bool IsStackTrace ( string  msg)
inlinestaticprivate

◆ Log()

static void Log ( string  msg)
inlinestaticprivate

Prints debug message with normal prio.

Parameters
msgstring Debug message for print
Returns
void None
DebugPrint.Log("Hello World");
>> [Log]: Hello World;

References LogMessage(), MSG_LOG, and s_TraceAllLogs.

◆ LogAndTrace()

static void LogAndTrace ( string  msg)
inlinestaticprivate

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

Parameters
msgstring 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
>> -----------------
Mission mission
Definition DisplayStatus.c:28
static void LogAndTrace(string msg)
Prints debug message as normal message and prints stack trace of calls.
Definition DebugPrint.c:56

References LogMessage(), and MSG_LOG.

◆ LogError()

static void LogError ( string  msg)
inlinestaticprivate

Prints debug message as error message.

Parameters
msgstring 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 LogError(string msg)
Prints debug message as error message.
Definition DebugPrint.c:105
void Error(string err)
Messagebox with error message.
Definition EnDebug.c:90

References LogMessage(), MSG_ERROR, and s_TraceAllLogs.

◆ LogErrorAndTrace()

static void LogErrorAndTrace ( string  msg)
inlinestaticprivate

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

Parameters
msgstring 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
>> -----------------
static void LogErrorAndTrace(string msg)
Prints debug message as error message and prints stack trace of calls.
Definition DebugPrint.c:124

References LogMessage(), and MSG_ERROR.

Referenced by OnlineServices::ErrorCaught(), OnlineServices::LoadFriends(), OnlineServices::LoadMPPrivilege(), OnlineServices::LoadPermissions(), OnlineServices::LoadServers(), OnlineServices::LoadVoicePrivilege(), OnlineServices::SetServerFavorited(), OnlineServices::ShowInviteScreen(), and OnlineServices::ShowUserProfile().

◆ LogMessage()

static private void LogMessage ( string  msg,
int  msg_type,
bool  trace = false 
)
inlinestaticprivate

◆ LogWarning()

static void LogWarning ( string  msg)
inlinestaticprivate

Prints debug message as warning message.

Parameters
msgstring 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 LogWarning(string msg)
Prints debug message as warning message.
Definition DebugPrint.c:71

References LogMessage(), MSG_WARNING, and s_TraceAllLogs.

◆ LogWarningAndTrace()

static void LogWarningAndTrace ( string  msg)
inlinestaticprivate

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

Parameters
msgstring 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
>> -----------------
static void LogWarningAndTrace(string msg)
Prints debug message as warning message and prints stack trace of calls.
Definition DebugPrint.c:90

References LogMessage(), and MSG_WARNING.

◆ OnInit()

static void OnInit ( )
inlinestaticprivate

◆ TrimDebugLog()

static private string TrimDebugLog ( string  msg)
inlinestaticprivate

◆ TrimStackTrace()

static private string TrimStackTrace ( string  msg)
inlinestaticprivate

References string::Empty, and string::IndexOf().

Referenced by AdjustDebugLog().

Field Documentation

◆ MSG_COUNT

private const int MSG_COUNT = 3
staticprivate

Referenced by IsDebugLog().

◆ MSG_ERROR

private const int MSG_ERROR = 2
staticprivate

Referenced by LogError(), LogErrorAndTrace(), and OnInit().

◆ MSG_LOG

private const int MSG_LOG = 0
staticprivate

Referenced by Log(), LogAndTrace(), and OnInit().

◆ MSG_WARNING

private const int MSG_WARNING = 1
staticprivate

◆ s_MsgPrefix

private string s_MsgPrefix[MSG_COUNT]
staticprivate

Referenced by IsDebugLog(), LogMessage(), and OnInit().

◆ s_MsgStackMarked

private bool s_MsgStackMarked
staticprivate

Referenced by IsStackTrace(), and OnInit().

◆ s_MsgStackMarkEnd

private string s_MsgStackMarkEnd
staticprivate

Referenced by IsStackTrace(), and OnInit().

◆ s_MsgStackMarkStart

private string s_MsgStackMarkStart
staticprivate

Referenced by IsStackTrace(), and OnInit().

◆ s_TraceAllLogs

private bool s_TraceAllLogs
staticprivate

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