mirror of
https://github.com/indig0fox/Arma3-AttendanceTracker.git/
synced 2025-12-08 01:41:49 -06:00
- using a3go 0.3.2, no longer relies on ext callback for anything except RPT logging and waiting DB connect at postinit - tested and functional
32 lines
518 B
Plaintext
32 lines
518 B
Plaintext
#include "script_component.hpp"
|
|
|
|
if (!isServer) exitWith {};
|
|
|
|
if (typeName _this != "ARRAY") exitWith {
|
|
diag_log format ["[%1]: Invalid log params: %2", GVAR(logPrefix), _this];
|
|
};
|
|
|
|
params [
|
|
["_level", "INFO", [""]],
|
|
["_text", "", ["", []]]
|
|
];
|
|
|
|
if (_text isEqualType []) then {
|
|
_text = format ["%1", _text];
|
|
};
|
|
|
|
if (
|
|
_level == "DEBUG" &&
|
|
!GVAR(debug)
|
|
) exitWith {};
|
|
|
|
if (_text isEqualTo "") exitWith {};
|
|
|
|
diag_log formatText [
|
|
"[%1] %2: %3",
|
|
GVAR(logPrefix),
|
|
_level,
|
|
_text
|
|
];
|
|
|