DayZ Enforce
Script API
Static Private Member Functions | Static Private Attributes | List of all members
Debug Class Reference

#include <Debug.h>

Static Private Member Functions

static void  Init ()
 
static void  OnDestroy ()
 
static void  DestroyAllShapes ()
 
static void  SetEnabledLogs (bool enable)
 
static bool  IsLogsEnabled ()
 
static void  Log (string message=LOG_DEFAULT, string module=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
  Prints debug message with normal prio. More...
 
static void  LogInfo (string message=LOG_DEFAULT, string module=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
  Prints debug message with normal prio. More...
 
static void  LogWarning (string message=LOG_DEFAULT, string module=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
  Prints debug message as warning message. More...
 
static void  LogError (string message=LOG_DEFAULT, string module=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
  Prints debug message as error message. More...
 
static void  ReceivedLogMessageFromServer (string message)
 
static Shape  DrawBox (vector pos1, vector pos2, int color=0x1fff7f7f)
 
static Shape  DrawArrow (vector from, vector to, float size=0.5, int color=0xFFFFFFFF, float flags=0)
 
static Shape  DrawLine (vector from, vector to, int color=0xFFFFFFFF, int flags=0)
 
static private void  LoadFile ()
 
static private void  LogMessage (string level, string module, string entity, string author, string label, string message)
 
static private void  SaveLog (string log_message)
 
static private string  GetFileName ()
 
static private string  GetDate ()
 

Static Private Attributes

static private const string  LOG_DEBUG = "Debug"
 
static private const string  LOG_INFO = "Info"
 
static private const string  LOG_WARNING = "Warning"
 
static private const string  LOG_ERROR = "Error"
 
static private const string  LOG_DEFAULT = "n/a"
 
static private array< Shape m_DebugShapes
 
static private TStringArray  m_FileContent
 
static private bool  m_EnabledLogs
 

Member Function Documentation

static void Debug::Init ( )
staticprivate

References m_DebugShapes, and m_FileContent.

Referenced by DayZGame::DayZGame().

static void Debug::OnDestroy ( )
staticprivate

References m_DebugShapes, and m_FileContent.

Referenced by DayZGame::~DayZGame().

static void Debug::DestroyAllShapes ( )
staticprivate

References m_DebugShapes.

Referenced by MissionBase::MissionBase().

static void Debug::SetEnabledLogs ( bool  enable )
staticprivate
static bool Debug::IsLogsEnabled ( )
staticprivate

References m_EnabledLogs.

Referenced by LogMessage().

static void Debug::Log ( string  message = LOG_DEFAULT,
string  module = LOG_DEFAULT,
string  author = LOG_DEFAULT,
string  label = LOG_DEFAULT,
string  entity = LOG_DEFAULT 
)
staticprivate
static void Debug::LogInfo ( string  message = LOG_DEFAULT,
string  module = LOG_DEFAULT,
string  author = LOG_DEFAULT,
string  label = LOG_DEFAULT,
string  entity = LOG_DEFAULT 
)
staticprivate

Prints debug message with normal prio.

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

References LOG_INFO, and LogMessage().

Referenced by LogInfo().

static void Debug::LogWarning ( string  message = LOG_DEFAULT,
string  module = LOG_DEFAULT,
string  author = LOG_DEFAULT,
string  label = LOG_DEFAULT,
string  entity = LOG_DEFAULT 
)
staticprivate

Prints debug message as warning message.

Parameters
msg string Debug message for warning print
Returns
void None
Debug.LogWarning("Hello World, this is warning log");
>> [Warning]: Hello World, this is warning log

References LOG_WARNING, and LogMessage().

Referenced by Component::LogThisWarning(), LogWarning(), EntityAI::LogWarning(), and TeleportAtCursor().

static void Debug::LogError ( string  message = LOG_DEFAULT,
string  module = LOG_DEFAULT,
string  author = LOG_DEFAULT,
string  label = LOG_DEFAULT,
string  entity = LOG_DEFAULT 
)
staticprivate

Prints debug message as error message.

Parameters
msg string Debug message for error print
Returns
void None
Debug.LogError("Hello World, this is error log");
>> [Error]: Hello World, this is error log

References LOG_ERROR, and LogMessage().

Referenced by LogError(), EntityAI::LogError(), Component::LogErrorBadCompType(), Component::LogThisError(), Component::LogWarningAlredyExist(), and ItemBase::SetQuantity2().

static void Debug::ReceivedLogMessageFromServer ( string  message )
staticprivate

References SaveLog().

Referenced by OnRPCServerLogRecieved().

static Shape Debug::DrawBox ( vector  pos1,
vector  pos2,
int  color = 0x1fff7f7f 
)
staticprivate
static Shape Debug::DrawArrow ( vector  from,
vector  to,
float  size = 0.5,
int  color = 0xFFFFFFFF,
float  flags = 0 
)
staticprivate
static Shape Debug::DrawLine ( vector  from,
vector  to,
int  color = 0xFFFFFFFF,
int  flags = 0 
)
staticprivate

References AddDLines(), and m_DebugShapes.

static private void Debug::LoadFile ( )
staticprivate
static private void Debug::LogMessage ( string  level,
string  module,
string  entity,
string  author,
string  label,
string  message 
)
staticprivate
static private void Debug::SaveLog ( string  log_message )
staticprivate
static private string Debug::GetFileName ( )
staticprivate

References CFG_FILE_SCRIPT_LOG_EXT.

Referenced by LoadFile(), and SaveLog().

static private string Debug::GetDate ( )
staticprivate

References GetHourMinuteSecond(), GetYearMonthDay(), and itoal().

Referenced by LogMessage().

Member Data Documentation

private const string Debug::LOG_DEBUG = "Debug"
staticprivate

Referenced by Log().

private const string Debug::LOG_INFO = "Info"
staticprivate

Referenced by LogInfo().

private const string Debug::LOG_WARNING = "Warning"
staticprivate

Referenced by LogWarning().

private const string Debug::LOG_ERROR = "Error"
staticprivate

Referenced by LogError().

private const string Debug::LOG_DEFAULT = "n/a"
staticprivate

Referenced by LogMessage().

private array<Shape> Debug::m_DebugShapes
staticprivate
private TStringArray Debug::m_FileContent
staticprivate

Referenced by Init(), LoadFile(), OnDestroy(), and SaveLog().

private bool Debug::m_EnabledLogs
staticprivate

Referenced by IsLogsEnabled(), and SetEnabledLogs().


The documentation for this class was generated from the following files:
Converted from CHM to HTML with chm2web Pro 2.85 (unicode)