DayZ 1.24
Loading...
Searching...
No Matches
LogTemplates.c File Reference

Go to the source code of this file.

Classes

class  LogTemplates
 

Typedefs

typedef Param3< string, string, stringLogTemplate
 
typedef int LogTemplateID
 

Functions

class LogTemplates Log (string message, LogTemplateID template_id=0)
 Creates debug log (optional) from LogTemplate which are registred.
 
void RegisterLogTamplate (LogTemplateID template_id, string author, string plugin, string label)
 
static void Init ()
 
static LogTemplate GetTemplate (LogTemplateID template_id)
 
void LogInfo (string message, LogTemplateID template_id=0)
 Creates info log (optional) from LogTemplate which are registred.
 
void LogWarning (string message, LogTemplateID template_id=0)
 Creates warning log (optional) from LogTemplate which are registred.
 
void LogError (string message, LogTemplateID template_id=0)
 Creates error log (optional) from LogTemplate which are registred.
 
void SQFPrint (string sqf_msg)
 
void SQFLog (string sqf_msg)
 

Variables

ref map< LogTemplateID, ref LogTemplatem_LogTemplates
 
static LogTemplateID TEMPLATE_UNKNOWN = 0
 
static LogTemplateID TEMPLATE_JANOSIK = 1
 
static LogTemplateID TEMPLATE_PLAYER_WEIGHT = 2
 
static LogTemplateID TEMPLATE_BROADCAST = 3
 

Typedef Documentation

◆ LogTemplate

Definition at line 1 of file LogTemplates.c.

◆ LogTemplateID

Definition at line 2 of file LogTemplates.c.

Function Documentation

◆ GetTemplate()

static LogTemplate Log::GetTemplate ( LogTemplateID template_id)
staticprivate

Definition at line 109 of file LogTemplates.c.

124{
126
128}
129
130void SQFPrint(string sqf_msg)
131{
132 Print(sqf_msg);
133}
134
135void SQFLog(string sqf_msg)
136{
137 Log(sqf_msg);
138}
void SQFPrint(string sqf_msg)
void SQFLog(string sqf_msg)
class LogTemplates Log(string message, LogTemplateID template_id=0)
Creates debug log (optional) from LogTemplate which are registred.
Definition Debug.c:14
static void LogError(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Prints debug message as error message.
Definition Debug.c:341
static LogTemplate GetTemplate(LogTemplateID template_id)
proto void Print(void var)
Prints content of variable to console/log.

◆ Init()

static void Log::Init ( )
staticprivate

Definition at line 97 of file LogTemplates.c.

◆ Log()

class LogTemplates Log ( string message,
LogTemplateID template_id = 0 )

Creates debug log (optional) from LogTemplate which are registred.

Parameters
template_idLogTemplateID ID of LogTemplate which was registred in proto/Logtemplate.h -> "class LogTemplates"
messagestring Debug message for log
Returns
void
Log("This is some debug log message", TEMPLATE_JINDRICH);

Definition at line 2 of file LogTemplates.c.

70{
72
73 Debug.Log(message, log_template.param2, log_template.param1, log_template.param3);
74}
static void Log(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Prints debug message with normal prio.
Definition Debug.c:133

Referenced by PluginBase::CheckInit(), Debug(), UIPopupScript::OnClick(), PluginFileHandler::SaveParameter(), and SQFLog().

◆ LogError()

void LogError ( string message,
LogTemplateID template_id = 0 )

Creates error log (optional) from LogTemplate which are registred.

Parameters
template_idLogTemplateID ID of LogTemplate which was registred in proto/Logtemplate.h -> "class LogTemplates"
messagestring Error message for log
Returns
void
LogT(TEMPLATE_JINDRICH, "This is some error log message");

Definition at line 123 of file LogTemplates.c.

References LogTemplates::GetTemplate(), and Debug::LogError().

Referenced by GameInventory::OnServerInventoryCommandStatic().

◆ LogInfo()

void LogInfo ( string message,
LogTemplateID template_id = 0 )

Creates info log (optional) from LogTemplate which are registred.

Parameters
template_idLogTemplateID ID of LogTemplate which was registred in proto/Logtemplate.h -> "class LogTemplates"
messagestring Info message for log
Returns
void
LogInfo("This is some info log message", TEMPLATE_JINDRICH);
void LogInfo(string message, LogTemplateID template_id=0)
Creates info log (optional) from LogTemplate which are registred.

Definition at line 87 of file LogTemplates.c.

88{
90
92}
static void LogInfo(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Prints debug message with normal prio.
Definition Debug.c:301

References LogTemplates::GetTemplate(), and Debug::LogInfo().

◆ LogWarning()

void LogWarning ( string message,
LogTemplateID template_id = 0 )

Creates warning log (optional) from LogTemplate which are registred.

Parameters
template_idLogTemplateID ID of LogTemplate which was registred in proto/Logtemplate.h -> "class LogTemplates"
messagestring Warning message for log
Returns
void
LogT(TEMPLATE_JINDRICH, "This is some warning log message");

Definition at line 105 of file LogTemplates.c.

106{
108
110}
static void LogWarning(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Prints debug message as warning message.
Definition Debug.c:321

References LogTemplates::GetTemplate().

◆ RegisterLogTamplate()

void Log::RegisterLogTamplate ( LogTemplateID template_id,
string author,
string plugin,
string label )
staticprivate

Definition at line 72 of file LogTemplates.c.

◆ SQFLog()

void SQFLog ( string sqf_msg)

Definition at line 135 of file LogTemplates.c.

136{
137 Log(sqf_msg);
138}

References Log().

◆ SQFPrint()

void SQFPrint ( string sqf_msg)

Definition at line 130 of file LogTemplates.c.

131{
132 Print(sqf_msg);
133}

References Print().

Variable Documentation

◆ m_LogTemplates

ref map<LogTemplateID, ref LogTemplate> m_LogTemplates
staticprivate

Definition at line 70 of file LogTemplates.c.

◆ TEMPLATE_BROADCAST

LogTemplateID TEMPLATE_BROADCAST = 3
staticprivate

Definition at line 95 of file LogTemplates.c.

◆ TEMPLATE_JANOSIK

LogTemplateID TEMPLATE_JANOSIK = 1
staticprivate

Definition at line 93 of file LogTemplates.c.

◆ TEMPLATE_PLAYER_WEIGHT

LogTemplateID TEMPLATE_PLAYER_WEIGHT = 2
staticprivate

Definition at line 94 of file LogTemplates.c.

◆ TEMPLATE_UNKNOWN

LogTemplateID TEMPLATE_UNKNOWN = 0
staticprivate

Definition at line 92 of file LogTemplates.c.