mirror of
https://github.com/indig0fox/Arma3-AttendanceTracker.git/
synced 2025-12-08 09:51:47 -06:00
implement CBA macros, fix for prod
- 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
This commit is contained in:
31
addons/main/fnc_log.sqf
Normal file
31
addons/main/fnc_log.sqf
Normal file
@@ -0,0 +1,31 @@
|
||||
#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
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user