From ebf2c4cfb2fa1d632acb419770e78576f1785556 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Thu, 19 Dec 2019 19:52:59 -0600 Subject: [PATCH 1/5] Standerdize XEH and Versioning logging prefixs --- addons/versioning/XEH_postInit.sqf | 6 +++--- addons/xeh/fnc_addClassEventHandler.sqf | 2 +- addons/xeh/fnc_compileEventHandlers.sqf | 4 ++-- addons/xeh/fnc_initDisplay3DEN.sqf | 2 +- addons/xeh/fnc_postInit.sqf | 4 ++-- addons/xeh/fnc_preInit.sqf | 10 +++++----- addons/xeh/fnc_preStart.sqf | 8 ++++---- addons/xeh/script_component.hpp | 2 +- 8 files changed, 19 insertions(+), 19 deletions(-) diff --git a/addons/versioning/XEH_postInit.sqf b/addons/versioning/XEH_postInit.sqf index 1f8ba5842..668e2170b 100644 --- a/addons/versioning/XEH_postInit.sqf +++ b/addons/versioning/XEH_postInit.sqf @@ -6,11 +6,11 @@ SCRIPT(XEH_postInit); */ if (!SLX_XEH_DisableLogging) then { - private _logMsg = "CBA_VERSIONING: "; + private _logMsgs = []; private _filter = {if (_x isEqualType 1) then {[_x] call CBA_fnc_formatNumber} else {_x}}; - [GVAR(versions), { _logMsg = (_logMsg + format["%1=%2, ", _key, ([_value select 0, _filter] call CBA_fnc_filter) joinString "."])}] call CBA_fnc_hashEachPair; + [GVAR(versions), { _logMsgs pushBack format["%1=%2", _key, ([_value select 0, _filter] call CBA_fnc_filter) joinString "."]}] call CBA_fnc_hashEachPair; - diag_log [diag_frameNo, diag_tickTime, time, _logMsg]; + diag_log text format ["[CBA] (versioning) [%1,%2,%3] %4", diag_frameNo, diag_tickTime, time, _logMsgs joinString ", "]; }; // Dependency check and warn diff --git a/addons/xeh/fnc_addClassEventHandler.sqf b/addons/xeh/fnc_addClassEventHandler.sqf index fc7d5983b..5734609d3 100644 --- a/addons/xeh/fnc_addClassEventHandler.sqf +++ b/addons/xeh/fnc_addClassEventHandler.sqf @@ -33,7 +33,7 @@ private _config = configFile >> "CfgVehicles" >> _className; // init fallback loop when executing on incompatible class for the first time if (!GVAR(fallbackRunning) && {ISINCOMP(_className)}) then { - diag_log text format ["[XEH]: One or more children of class %1 do not support Extended Event Handlers. Fall back to loop.", configName _config]; + diag_log text format ["[CBA] (XEH): One or more children of class %1 do not support Extended Event Handlers. Fall back to loop.", configName _config]; call CBA_fnc_startFallbackLoop; }; diff --git a/addons/xeh/fnc_compileEventHandlers.sqf b/addons/xeh/fnc_compileEventHandlers.sqf index 0a5a4f471..a3cdca4b5 100644 --- a/addons/xeh/fnc_compileEventHandlers.sqf +++ b/addons/xeh/fnc_compileEventHandlers.sqf @@ -31,7 +31,7 @@ private _allowRecompile = _baseConfig isEqualTo configFile; if (_allowRecompile) then { if ("compile" call CBA_fnc_isRecompileEnabled || {isFilePatchingEnabled}) then { - XEH_LOG("XEH: init function preProcessing disabled [recompile or filepatching enabled]"); + XEH_LOG("init function preProcessing disabled [recompile or filepatching enabled]"); _allowRecompile = false; }; }; @@ -123,7 +123,7 @@ if (_allowRecompile) then { if (_eventName == "fired") then { // generate backwards compatible format of _this _eventFuncBase = "private _this = [_this select 0, _this select 1, _this select 2, _this select 3, _this select 4, _this select 6, _this select 5];"; - diag_log text format ["[XEH]: Usage of deprecated Extended Event Handler ""fired"". Use ""firedBIS"" instead. Path: %1\%2\%3\%4.", configSourceMod _x, _baseConfig, XEH_FORMAT_CONFIG_NAME(_eventName), _className]; + diag_log text format ["[CBA] (XEH): Usage of deprecated Extended Event Handler ""fired"". Use ""firedBIS"" instead. Path: %1\%2\%3\%4.", configSourceMod _x, _baseConfig, XEH_FORMAT_CONFIG_NAME(_eventName), _className]; }; { diff --git a/addons/xeh/fnc_initDisplay3DEN.sqf b/addons/xeh/fnc_initDisplay3DEN.sqf index 1b8487afc..5e294a01f 100644 --- a/addons/xeh/fnc_initDisplay3DEN.sqf +++ b/addons/xeh/fnc_initDisplay3DEN.sqf @@ -4,7 +4,7 @@ params ["_display"]; private _fnc_watchDog = { if (!ISPROCESSED(missionNamespace)) then { - diag_log text format ["XEH: missionNamespace processed [%1]", ISPROCESSED(missionNamespace)]; + diag_log text format ["[CBA] (XEH): missionNamespace processed [%1]", ISPROCESSED(missionNamespace)]; [] call CBA_fnc_preInit; }; }; diff --git a/addons/xeh/fnc_postInit.sqf b/addons/xeh/fnc_postInit.sqf index 3b38f1e89..63fbe274c 100644 --- a/addons/xeh/fnc_postInit.sqf +++ b/addons/xeh/fnc_postInit.sqf @@ -17,7 +17,7 @@ Author: ---------------------------------------------------------------------------- */ isNil { - XEH_LOG("XEH: PostInit started. " + PFORMAT_9("MISSIONINIT",missionName,missionVersion,worldName,isMultiplayer,isServer,isDedicated,CBA_isHeadlessClient,hasInterface,didJIP)); + XEH_LOG("PostInit started. " + PFORMAT_9("MISSIONINIT",missionName,missionVersion,worldName,isMultiplayer,isServer,isDedicated,CBA_isHeadlessClient,hasInterface,didJIP)); // fix CBA_missionTime being -1 on (non-JIP) clients at mission start. if (CBA_missionTime == -1) then { @@ -60,7 +60,7 @@ isNil { SLX_XEH_MACHINE set [8, true]; // PostInit passed - XEH_LOG("XEH: PostInit finished."); + XEH_LOG("PostInit finished."); }; nil diff --git a/addons/xeh/fnc_preInit.sqf b/addons/xeh/fnc_preInit.sqf index 34c6628ee..8c4ab6913 100644 --- a/addons/xeh/fnc_preInit.sqf +++ b/addons/xeh/fnc_preInit.sqf @@ -17,13 +17,13 @@ Author: ---------------------------------------------------------------------------- */ if (ISPROCESSED(missionNamespace)) exitWith { - diag_log text "[XEH]: preInit already executed. Abort preInit."; + diag_log text "[CBA] (XEH): preInit already executed. Abort preInit."; }; SETPROCESSED(missionNamespace); SLX_XEH_DisableLogging = uiNamespace getVariable ["SLX_XEH_DisableLogging", false]; // get from preStart -XEH_LOG("XEH: PreInit started. v" + getText (configFile >> "CfgPatches" >> "cba_common" >> "versionStr")); +XEH_LOG("PreInit started. v" + getText (configFile >> "CfgPatches" >> "cba_common" >> "versionStr")); SLX_XEH_STR = ""; // does nothing, never changes, backwards compatibility SLX_XEH_COMPILE = compileFinal "compile preprocessFileLineNumbers _this"; //backwards comps @@ -90,7 +90,7 @@ GVAR(incompatible) = [] call CBA_fnc_createNamespace; // always recompile extended event handlers #ifdef DEBUG_MODE_FULL - XEH_LOG("XEH: Compiling XEH START"); + XEH_LOG("Compiling XEH START"); #endif //Get configFile eventhandlers from cache that was generated at preStart @@ -101,7 +101,7 @@ GVAR(allEventHandlers) = call (uiNamespace getVariable [QGVAR(configFileEventHan } forEach [campaignConfigFile, missionConfigFile]; #ifdef DEBUG_MODE_FULL - XEH_LOG("XEH: Compiling XEH END"); + XEH_LOG("Compiling XEH END"); #endif // add extended event handlers to classes @@ -192,4 +192,4 @@ if (!isServer) then { // only on client }] call CBA_fnc_addEventHandler; #endif -XEH_LOG("XEH: PreInit finished."); +XEH_LOG("PreInit finished."); diff --git a/addons/xeh/fnc_preStart.sqf b/addons/xeh/fnc_preStart.sqf index 22c4b0d07..650aa7a87 100644 --- a/addons/xeh/fnc_preStart.sqf +++ b/addons/xeh/fnc_preStart.sqf @@ -21,7 +21,7 @@ Author: with uiNamespace do { SLX_XEH_DisableLogging = isClass (configFile >> "CfgPatches" >> "Disable_XEH_Logging"); - XEH_LOG("XEH: PreStart started."); + XEH_LOG("PreStart started."); SLX_XEH_COMPILE = compileFinal "compile preprocessFileLineNumbers _this"; //backwards comps SLX_XEH_COMPILE_NEW = CBA_fnc_compileFunction; //backwards comp @@ -53,16 +53,16 @@ with uiNamespace do { diag_log text format ["isScheduled = %1", call CBA_fnc_isScheduled]; #endif - XEH_LOG("XEH: PreStart finished."); + XEH_LOG("PreStart finished."); // check extended event handlers compatibility { _x params ["_classname", "_addon"]; if (_addon == "") then { - diag_log text format ["[XEH]: %1 does not support Extended Event Handlers!", _classname]; + diag_log text format ["[CBA] (XEH): %1 does not support Extended Event Handlers!", _classname]; } else { - diag_log text format ["[XEH]: %1 does not support Extended Event Handlers! Addon: %2", _classname, _addon]; + diag_log text format ["[CBA] (XEH): %1 does not support Extended Event Handlers! Addon: %2", _classname, _addon]; }; } forEach (true call CBA_fnc_supportMonitor); diff --git a/addons/xeh/script_component.hpp b/addons/xeh/script_component.hpp index 41be0b1fc..503739400 100644 --- a/addons/xeh/script_component.hpp +++ b/addons/xeh/script_component.hpp @@ -14,7 +14,7 @@ #include "\x\cba\addons\main\script_macros.hpp" -#define XEH_LOG(msg) if (!SLX_XEH_DisableLogging) then { diag_log [diag_frameNo, diag_tickTime, time, msg] } +#define XEH_LOG(msg) if (!SLX_XEH_DisableLogging) then { diag_log text format ['[CBA] (XEH) [%1,%2,%3] %4', diag_frameNo, diag_tickTime, time, msg] } #define SYS_EVENTHANDLERS(type,class) format [QGVAR(%1:%2), type, class] #define EVENTHANDLERS(type,class) (missionNamespace getVariable [SYS_EVENTHANDLERS(type,class), []]) From b02f17828f761cd4de07a0286b7e7f82b87a5ce2 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Fri, 20 Dec 2019 14:43:32 -0600 Subject: [PATCH 2/5] Use INFO/WARNING macros --- addons/versioning/XEH_postInit.sqf | 3 ++- addons/versioning/XEH_postInitClient.sqf | 8 ++++---- addons/versioning/script_component.hpp | 1 + addons/xeh/fnc_addClassEventHandler.sqf | 2 +- addons/xeh/fnc_compileEventHandlers.sqf | 2 +- addons/xeh/fnc_initDisplay3DEN.sqf | 2 +- addons/xeh/fnc_preInit.sqf | 2 +- addons/xeh/fnc_preStart.sqf | 4 ++-- addons/xeh/script_component.hpp | 3 ++- 9 files changed, 15 insertions(+), 12 deletions(-) diff --git a/addons/versioning/XEH_postInit.sqf b/addons/versioning/XEH_postInit.sqf index 668e2170b..517ddabab 100644 --- a/addons/versioning/XEH_postInit.sqf +++ b/addons/versioning/XEH_postInit.sqf @@ -9,8 +9,9 @@ if (!SLX_XEH_DisableLogging) then { private _logMsgs = []; private _filter = {if (_x isEqualType 1) then {[_x] call CBA_fnc_formatNumber} else {_x}}; [GVAR(versions), { _logMsgs pushBack format["%1=%2", _key, ([_value select 0, _filter] call CBA_fnc_filter) joinString "."]}] call CBA_fnc_hashEachPair; + private _logMsg = _logMsgs joinString ", "; - diag_log text format ["[CBA] (versioning) [%1,%2,%3] %4", diag_frameNo, diag_tickTime, time, _logMsgs joinString ", "]; + INFO_2("%1 VERSIONING:%2", [ARR_3(diag_frameNo, diag_tickTime, time)], _logMsg); }; // Dependency check and warn diff --git a/addons/versioning/XEH_postInitClient.sqf b/addons/versioning/XEH_postInitClient.sqf index 9435fdb77..1b521466c 100644 --- a/addons/versioning/XEH_postInitClient.sqf +++ b/addons/versioning/XEH_postInitClient.sqf @@ -5,11 +5,11 @@ if (isServer) exitWith {}; SLX_XEH_STR spawn { waitUntil {!(isNil QGVAR(versions_serv))}; if (!SLX_XEH_DisableLogging) then { - private "_logMsg"; - _logMsg = "CBA_VERSIONING_SERVER: "; - [GVAR(versions_serv), { _logMsg = (_logMsg + format["%1=%2, ", _key, (_value select 0) joinString "."])}] call CBA_fnc_hashEachPair; + private _logMsgs = []; + [GVAR(versions_serv), { _logMsgs pushBack format["%1=%2", _key, (_value select 0) joinString "."]}] call CBA_fnc_hashEachPair; + private _logMsg = _logMsgs joinString ", "; - diag_log [diag_frameNo, diag_tickTime, time, _logMsg]; + INFO_2("%1 VERSIONING_SERVER:%2", [ARR_3(diag_frameNo, diag_tickTime, time)], _logMsg); }; [GVAR(versions_serv), {call FUNC(version_check)}] call CBA_fnc_hashEachPair; }; diff --git a/addons/versioning/script_component.hpp b/addons/versioning/script_component.hpp index d46ebc19a..b04c0ffea 100644 --- a/addons/versioning/script_component.hpp +++ b/addons/versioning/script_component.hpp @@ -9,4 +9,5 @@ #define DEBUG_SETTINGS DEBUG_SETTINGS_VERSIONING #endif +#define DEBUG_SYNCHRONOUS #include "\x\cba\addons\main\script_macros.hpp" diff --git a/addons/xeh/fnc_addClassEventHandler.sqf b/addons/xeh/fnc_addClassEventHandler.sqf index 5734609d3..755b13295 100644 --- a/addons/xeh/fnc_addClassEventHandler.sqf +++ b/addons/xeh/fnc_addClassEventHandler.sqf @@ -33,7 +33,7 @@ private _config = configFile >> "CfgVehicles" >> _className; // init fallback loop when executing on incompatible class for the first time if (!GVAR(fallbackRunning) && {ISINCOMP(_className)}) then { - diag_log text format ["[CBA] (XEH): One or more children of class %1 do not support Extended Event Handlers. Fall back to loop.", configName _config]; + WARNING_1("One or more children of class %1 do not support Extended Event Handlers. Fall back to loop.", configName _config); call CBA_fnc_startFallbackLoop; }; diff --git a/addons/xeh/fnc_compileEventHandlers.sqf b/addons/xeh/fnc_compileEventHandlers.sqf index a3cdca4b5..aeefd1033 100644 --- a/addons/xeh/fnc_compileEventHandlers.sqf +++ b/addons/xeh/fnc_compileEventHandlers.sqf @@ -123,7 +123,7 @@ if (_allowRecompile) then { if (_eventName == "fired") then { // generate backwards compatible format of _this _eventFuncBase = "private _this = [_this select 0, _this select 1, _this select 2, _this select 3, _this select 4, _this select 6, _this select 5];"; - diag_log text format ["[CBA] (XEH): Usage of deprecated Extended Event Handler ""fired"". Use ""firedBIS"" instead. Path: %1\%2\%3\%4.", configSourceMod _x, _baseConfig, XEH_FORMAT_CONFIG_NAME(_eventName), _className]; + WARNING_4("Usage of deprecated Extended Event Handler ""fired"". Use ""firedBIS"" instead. Path: %1\%2\%3\%4.", configSourceMod _x, _baseConfig, XEH_FORMAT_CONFIG_NAME(_eventName), _className); }; { diff --git a/addons/xeh/fnc_initDisplay3DEN.sqf b/addons/xeh/fnc_initDisplay3DEN.sqf index 5e294a01f..9534f5d04 100644 --- a/addons/xeh/fnc_initDisplay3DEN.sqf +++ b/addons/xeh/fnc_initDisplay3DEN.sqf @@ -4,7 +4,7 @@ params ["_display"]; private _fnc_watchDog = { if (!ISPROCESSED(missionNamespace)) then { - diag_log text format ["[CBA] (XEH): missionNamespace processed [%1]", ISPROCESSED(missionNamespace)]; + INFO_1("missionNamespace processed [%1]", ISPROCESSED(missionNamespace)); [] call CBA_fnc_preInit; }; }; diff --git a/addons/xeh/fnc_preInit.sqf b/addons/xeh/fnc_preInit.sqf index 8c4ab6913..6e14e0e03 100644 --- a/addons/xeh/fnc_preInit.sqf +++ b/addons/xeh/fnc_preInit.sqf @@ -17,7 +17,7 @@ Author: ---------------------------------------------------------------------------- */ if (ISPROCESSED(missionNamespace)) exitWith { - diag_log text "[CBA] (XEH): preInit already executed. Abort preInit."; + XEH_LOG("preInit already executed. Abort preInit."); }; SETPROCESSED(missionNamespace); diff --git a/addons/xeh/fnc_preStart.sqf b/addons/xeh/fnc_preStart.sqf index 650aa7a87..2fe34bc69 100644 --- a/addons/xeh/fnc_preStart.sqf +++ b/addons/xeh/fnc_preStart.sqf @@ -60,9 +60,9 @@ with uiNamespace do { _x params ["_classname", "_addon"]; if (_addon == "") then { - diag_log text format ["[CBA] (XEH): %1 does not support Extended Event Handlers!", _classname]; + WARNING_1("%1 does not support Extended Event Handlers!", _classname); } else { - diag_log text format ["[CBA] (XEH): %1 does not support Extended Event Handlers! Addon: %2", _classname, _addon]; + WARNING_2("%1 does not support Extended Event Handlers! Addon: %2", _classname, _addon); }; } forEach (true call CBA_fnc_supportMonitor); diff --git a/addons/xeh/script_component.hpp b/addons/xeh/script_component.hpp index 503739400..6f6b34376 100644 --- a/addons/xeh/script_component.hpp +++ b/addons/xeh/script_component.hpp @@ -12,9 +12,10 @@ #define DEBUG_SETTINGS DEBUG_SETTINGS_XEH #endif +#define DEBUG_SYNCHRONOUS #include "\x\cba\addons\main\script_macros.hpp" -#define XEH_LOG(msg) if (!SLX_XEH_DisableLogging) then { diag_log text format ['[CBA] (XEH) [%1,%2,%3] %4', diag_frameNo, diag_tickTime, time, msg] } +#define XEH_LOG(msg) if (!SLX_XEH_DisableLogging) then { INFO_2("%1 %2",[ARR_3(diag_frameNo, diag_tickTime, time)], msg); } #define SYS_EVENTHANDLERS(type,class) format [QGVAR(%1:%2), type, class] #define EVENTHANDLERS(type,class) (missionNamespace getVariable [SYS_EVENTHANDLERS(type,class), []]) From a0d5b8eb4c9a2ce134fd2cfaceb64ddbb2036143 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Fri, 20 Dec 2019 15:03:49 -0600 Subject: [PATCH 3/5] Use LOG_SYS for warnings --- addons/xeh/fnc_addClassEventHandler.sqf | 2 +- addons/xeh/fnc_compileEventHandlers.sqf | 2 +- addons/xeh/fnc_preStart.sqf | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/xeh/fnc_addClassEventHandler.sqf b/addons/xeh/fnc_addClassEventHandler.sqf index 755b13295..4cd0ffb0b 100644 --- a/addons/xeh/fnc_addClassEventHandler.sqf +++ b/addons/xeh/fnc_addClassEventHandler.sqf @@ -33,7 +33,7 @@ private _config = configFile >> "CfgVehicles" >> _className; // init fallback loop when executing on incompatible class for the first time if (!GVAR(fallbackRunning) && {ISINCOMP(_className)}) then { - WARNING_1("One or more children of class %1 do not support Extended Event Handlers. Fall back to loop.", configName _config); + LOG_SYS("WARNING",FORMAT_1("One or more children of class ""%1"" do not support Extended Event Handlers. Fall back to loop.", configName _config)); call CBA_fnc_startFallbackLoop; }; diff --git a/addons/xeh/fnc_compileEventHandlers.sqf b/addons/xeh/fnc_compileEventHandlers.sqf index aeefd1033..92101096c 100644 --- a/addons/xeh/fnc_compileEventHandlers.sqf +++ b/addons/xeh/fnc_compileEventHandlers.sqf @@ -123,7 +123,7 @@ if (_allowRecompile) then { if (_eventName == "fired") then { // generate backwards compatible format of _this _eventFuncBase = "private _this = [_this select 0, _this select 1, _this select 2, _this select 3, _this select 4, _this select 6, _this select 5];"; - WARNING_4("Usage of deprecated Extended Event Handler ""fired"". Use ""firedBIS"" instead. Path: %1\%2\%3\%4.", configSourceMod _x, _baseConfig, XEH_FORMAT_CONFIG_NAME(_eventName), _className); + LOG_SYS("WARNING",FORMAT_4("Usage of deprecated Extended Event Handler ""fired"". Use ""firedBIS"" instead. Path: %1\%2\%3\%4.", configSourceMod _x, _baseConfig, XEH_FORMAT_CONFIG_NAME(_eventName), _className)); }; { diff --git a/addons/xeh/fnc_preStart.sqf b/addons/xeh/fnc_preStart.sqf index 2fe34bc69..1293c7e2c 100644 --- a/addons/xeh/fnc_preStart.sqf +++ b/addons/xeh/fnc_preStart.sqf @@ -60,9 +60,9 @@ with uiNamespace do { _x params ["_classname", "_addon"]; if (_addon == "") then { - WARNING_1("%1 does not support Extended Event Handlers!", _classname); + LOG_SYS("WARNING",FORMAT_1("%1 does not support Extended Event Handlers!", _classname)); } else { - WARNING_2("%1 does not support Extended Event Handlers! Addon: %2", _classname, _addon); + LOG_SYS("WARNING",FORMAT_2("%1 does not support Extended Event Handlers! Addon: %2", _classname, _addon)); }; } forEach (true call CBA_fnc_supportMonitor); From 0141f073d52b6b6eba576bdd18dc29855b27d178 Mon Sep 17 00:00:00 2001 From: commy2 Date: Sat, 21 Dec 2019 14:24:31 +0100 Subject: [PATCH 4/5] Revert "Use LOG_SYS for warnings" This reverts commit a0d5b8eb4c9a2ce134fd2cfaceb64ddbb2036143. --- addons/xeh/fnc_addClassEventHandler.sqf | 2 +- addons/xeh/fnc_compileEventHandlers.sqf | 2 +- addons/xeh/fnc_preStart.sqf | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/xeh/fnc_addClassEventHandler.sqf b/addons/xeh/fnc_addClassEventHandler.sqf index 4cd0ffb0b..755b13295 100644 --- a/addons/xeh/fnc_addClassEventHandler.sqf +++ b/addons/xeh/fnc_addClassEventHandler.sqf @@ -33,7 +33,7 @@ private _config = configFile >> "CfgVehicles" >> _className; // init fallback loop when executing on incompatible class for the first time if (!GVAR(fallbackRunning) && {ISINCOMP(_className)}) then { - LOG_SYS("WARNING",FORMAT_1("One or more children of class ""%1"" do not support Extended Event Handlers. Fall back to loop.", configName _config)); + WARNING_1("One or more children of class %1 do not support Extended Event Handlers. Fall back to loop.", configName _config); call CBA_fnc_startFallbackLoop; }; diff --git a/addons/xeh/fnc_compileEventHandlers.sqf b/addons/xeh/fnc_compileEventHandlers.sqf index 92101096c..aeefd1033 100644 --- a/addons/xeh/fnc_compileEventHandlers.sqf +++ b/addons/xeh/fnc_compileEventHandlers.sqf @@ -123,7 +123,7 @@ if (_allowRecompile) then { if (_eventName == "fired") then { // generate backwards compatible format of _this _eventFuncBase = "private _this = [_this select 0, _this select 1, _this select 2, _this select 3, _this select 4, _this select 6, _this select 5];"; - LOG_SYS("WARNING",FORMAT_4("Usage of deprecated Extended Event Handler ""fired"". Use ""firedBIS"" instead. Path: %1\%2\%3\%4.", configSourceMod _x, _baseConfig, XEH_FORMAT_CONFIG_NAME(_eventName), _className)); + WARNING_4("Usage of deprecated Extended Event Handler ""fired"". Use ""firedBIS"" instead. Path: %1\%2\%3\%4.", configSourceMod _x, _baseConfig, XEH_FORMAT_CONFIG_NAME(_eventName), _className); }; { diff --git a/addons/xeh/fnc_preStart.sqf b/addons/xeh/fnc_preStart.sqf index 1293c7e2c..2fe34bc69 100644 --- a/addons/xeh/fnc_preStart.sqf +++ b/addons/xeh/fnc_preStart.sqf @@ -60,9 +60,9 @@ with uiNamespace do { _x params ["_classname", "_addon"]; if (_addon == "") then { - LOG_SYS("WARNING",FORMAT_1("%1 does not support Extended Event Handlers!", _classname)); + WARNING_1("%1 does not support Extended Event Handlers!", _classname); } else { - LOG_SYS("WARNING",FORMAT_2("%1 does not support Extended Event Handlers! Addon: %2", _classname, _addon)); + WARNING_2("%1 does not support Extended Event Handlers! Addon: %2", _classname, _addon); }; } forEach (true call CBA_fnc_supportMonitor); From 7c0cfeefb7d437fef58d8c7861070c7189e0ebc2 Mon Sep 17 00:00:00 2001 From: commy2 Date: Sat, 21 Dec 2019 14:44:21 +0100 Subject: [PATCH 5/5] remove some superfluous definitions --- addons/disposable/script_component.hpp | 1 - addons/optics/script_component.hpp | 1 - addons/xeh/fnc_addClassEventHandler.sqf | 2 +- addons/xeh/fnc_init.sqf | 1 - addons/xeh/script_component.hpp | 1 - 5 files changed, 1 insertion(+), 5 deletions(-) diff --git a/addons/disposable/script_component.hpp b/addons/disposable/script_component.hpp index ccaca1431..1478b6a09 100644 --- a/addons/disposable/script_component.hpp +++ b/addons/disposable/script_component.hpp @@ -13,7 +13,6 @@ #define DEBUG_SETTINGS DEBUG_SETTINGS_DISPOSABLE #endif -#define DEBUG_MODE_NORMAL #define DEBUG_SYNCHRONOUS #include "\x\cba\addons\main\script_macros.hpp" diff --git a/addons/optics/script_component.hpp b/addons/optics/script_component.hpp index 6d36320a1..17de53308 100644 --- a/addons/optics/script_component.hpp +++ b/addons/optics/script_component.hpp @@ -13,7 +13,6 @@ #define DEBUG_SETTINGS DEBUG_SETTINGS_OPTICS #endif -#define DEBUG_MODE_NORMAL #define DEBUG_SYNCHRONOUS #include "\x\cba\addons\main\script_macros.hpp" diff --git a/addons/xeh/fnc_addClassEventHandler.sqf b/addons/xeh/fnc_addClassEventHandler.sqf index 755b13295..03ad03c19 100644 --- a/addons/xeh/fnc_addClassEventHandler.sqf +++ b/addons/xeh/fnc_addClassEventHandler.sqf @@ -44,7 +44,7 @@ _eventName = toLower _eventName; // no such event if (_eventName == "FiredBIS") exitWith { - WARNING("Cannot add 'FiredBIS' - Use 'Fired' instead"); + WARNING("Cannot add ""FiredBIS"" - Use ""Fired"" instead."); false }; if !(_eventName in GVAR(EventsLowercase)) exitWith {false}; diff --git a/addons/xeh/fnc_init.sqf b/addons/xeh/fnc_init.sqf index d20f94de7..5a8184b9c 100644 --- a/addons/xeh/fnc_init.sqf +++ b/addons/xeh/fnc_init.sqf @@ -1,4 +1,3 @@ -#define DEBUG_SYNCHRONOUS #include "script_component.hpp" /* ---------------------------------------------------------------------------- Function: CBA_fnc_init diff --git a/addons/xeh/script_component.hpp b/addons/xeh/script_component.hpp index 6f6b34376..f024b3e9a 100644 --- a/addons/xeh/script_component.hpp +++ b/addons/xeh/script_component.hpp @@ -1,5 +1,4 @@ #define COMPONENT xeh - #include "\x\cba\addons\main\script_mod.hpp" //#define DEBUG_ENABLED_XEH