Class that handles all log related functions. More...
#include <script_log.hpp>
Data Structures | |
| struct | LogData |
| Internal representation of the log-data inside the AI. More... | |
Public Types | |
| enum | ScriptLogType { LOG_SQ_ERROR = 0, LOG_ERROR = 1, LOG_SQ_INFO = 2, LOG_WARNING = 3, LOG_INFO = 4 } |
Log levels; The value is also feed to DEBUG() lvl. More... | |
Static Public Member Functions | |
| static void | Info (const char *message) |
| Print an Info message to the logs. | |
| static void | Warning (const char *message) |
| Print a Warning message to the logs. | |
| static void | Error (const char *message) |
| Print an Error message to the logs. | |
| static void | FreeLogPointer () |
| Free the log pointer. | |
Static Private Member Functions | |
| static void | Log (ScriptLog::ScriptLogType level, const char *message) |
| Internal command to log the message in a common way. | |
Friends | |
| class | ScriptController |
Class that handles all log related functions.
ai game
Definition at line 21 of file script_log.hpp.
Log levels; The value is also feed to DEBUG() lvl.
This has no use for you, as AI writer. -all
| LOG_SQ_ERROR |
Squirrel printed an error. |
| LOG_ERROR |
User printed an error. |
| LOG_SQ_INFO |
Squirrel printed some info. |
| LOG_WARNING |
User printed some warning. |
| LOG_INFO |
User printed some info. |
Definition at line 32 of file script_log.hpp.
| void ScriptLog::Error | ( | const char * | message | ) | [static] |
Print an Error message to the logs.
| message | The message to log. |
Definition at line 28 of file script_log.cpp.
References Log(), and LOG_ERROR.
Referenced by ScriptInstance::GameLoop(), ScriptInstance::Initialize(), AIInstance::LoadCompatibilityScripts(), ScriptAdmin::MakeJSON(), ScriptInstance::Save(), ScriptInstance::SaveObject(), and ScriptAdmin::Send().
| void ScriptLog::FreeLogPointer | ( | ) | [static] |
Free the log pointer.
-all
Definition at line 80 of file script_log.cpp.
References ScriptLog::LogData::count, free(), ScriptObject::GetLogPointer(), ScriptLog::LogData::lines, and ScriptLog::LogData::type.
| void ScriptLog::Info | ( | const char * | message | ) | [static] |
Print an Info message to the logs.
| message | The message to log. |
Definition at line 18 of file script_log.cpp.
References Log(), and LOG_INFO.
Referenced by AIInstance::Died().
| void ScriptLog::Warning | ( | const char * | message | ) | [static] |
Print a Warning message to the logs.
| message | The message to log. |
Definition at line 23 of file script_log.cpp.
References Log(), and LOG_WARNING.
Referenced by ScriptInstance::CallLoad(), AIInstance::LoadCompatibilityScripts(), ScriptInstance::Save(), and ScriptController::Sleep().
1.7.1