diff --git a/addons/settings/XEH_postInit.sqf b/addons/settings/XEH_postInit.sqf index d5475be79..607a53fb2 100644 --- a/addons/settings/XEH_postInit.sqf +++ b/addons/settings/XEH_postInit.sqf @@ -3,7 +3,7 @@ // --- refresh all settings after postInit to guarantee that events are added and settings are recieved from server { if (isNil QGVAR(serverSettings)) then { - diag_log text "[CBA] (settings): No server settings after postInit phase."; + ERROR("No server settings after postInit phase."); }; //Event to read modules @@ -14,7 +14,7 @@ [QGVAR(refreshSetting), _x] call CBA_fnc_localEvent; } forEach GVAR(allSettings); - diag_log text format ["[CBA] (settings): Settings Initialized"]; + LOG("Settings Initialized"); ["CBA_settingsInitialized", []] call CBA_fnc_localEvent; } call CBA_fnc_execNextFrame; diff --git a/addons/settings/XEH_preInit.sqf b/addons/settings/XEH_preInit.sqf index 5eaea7002..b0b68e5ae 100644 --- a/addons/settings/XEH_preInit.sqf +++ b/addons/settings/XEH_preInit.sqf @@ -49,9 +49,9 @@ addMissionEventHandler ["Loaded", { ["CBA_SettingChanged", { params ["_setting", "_value"]; - private _message = format ["[CBA] (settings): %1 = %2", _setting, _value]; + private _message = format ["%1 = %2", _setting, _value]; systemChat _message; - diag_log text _message; + LOG(_message); }] call CBA_fnc_addEventHandler; #endif @@ -68,10 +68,12 @@ if (isServer) then { params ["_setting", "_value", ["_forced", false, [false]]]; if ([_setting, "mission"] call FUNC(isForced)) exitWith { - diag_log text format ["[CBA] (settings): Setting %1 already forced, ignoring setSettingMission.", _setting]; + private _message = format ["Setting %1 already forced, ignoring setSettingMission.", str _setting]; + LOG(_message); }; if (!([_setting, _value] call FUNC(check))) exitWith { - diag_log text format ["[CBA] (settings): Value %1 is invalid for setting %2.", _value, _setting]; + private _message = format ["Value %1 is invalid for setting %2.", _value, str _setting]; + WARNING(_message); }; GVAR(missionSettings) setVariable [_setting, [_value, _forced]]; diff --git a/addons/settings/fnc_init.sqf b/addons/settings/fnc_init.sqf index fddb6bbf7..562c53cbf 100644 --- a/addons/settings/fnc_init.sqf +++ b/addons/settings/fnc_init.sqf @@ -130,7 +130,8 @@ if (!isNil "_settingInfo") then { if !([_setting, _value] call FUNC(check)) then { _value = [_setting, "default"] call FUNC(get); [_setting, _value, _forced, "client"] call FUNC(set); - diag_log text format ["[CBA] (settings): Invalid value for setting %1. Fall back to default value.", str _setting]; + private _message = format ["Invalid value for setting %1. Fall back to default value.", str _setting]; + WARNING(_message); }; GVAR(clientSettings) setVariable [_setting, [_value, _forced]]; diff --git a/addons/settings/fnc_parse.sqf b/addons/settings/fnc_parse.sqf index 1e046483d..e85e5dbf8 100644 --- a/addons/settings/fnc_parse.sqf +++ b/addons/settings/fnc_parse.sqf @@ -98,12 +98,14 @@ private _result = []; private _currentValue = [_setting, "default"] call FUNC(get); if (isNil "_currentValue") then { - diag_log text format ["[CBA] (settings): Error parsing settings file. Setting %1 does not exist.", str _setting]; + private _message = format ["Error parsing settings file. Setting %1 does not exist.", str _setting]; + ERROR(_message); } else { if ([_setting, _value] call FUNC(check)) then { _result pushBack [_setting, _value, _force]; } else { - diag_log text format ["[CBA] (settings): Error parsing settings file. Value %1 is invalid for setting %2.", _value, str _setting]; + private _message = format ["Error parsing settings file. Value %1 is invalid for setting %2.", _value, str _setting]; + ERROR(_message); }; }; }; diff --git a/addons/settings/fnc_set.sqf b/addons/settings/fnc_set.sqf index 32369aa83..aa10d61dc 100644 --- a/addons/settings/fnc_set.sqf +++ b/addons/settings/fnc_set.sqf @@ -33,7 +33,8 @@ Author: params [["_setting", "", [""]], "_value", ["_forced", nil, [false]], ["_source", "client", [""]]]; if (!isNil "_value" && {!([_setting, _value] call FUNC(check))}) exitWith { - diag_log text format ["[CBA] (settings): Value %1 is invalid for setting %2.", _value, str _setting]; + private _message = format ["Value %1 is invalid for setting %2.", _value, str _setting]; + WARNING(_message); 1 }; diff --git a/optionals/auto_load_settings_file/loadSettingsFile.sqf b/optionals/auto_load_settings_file/loadSettingsFile.sqf index bfcf002ad..1e962a36a 100644 --- a/optionals/auto_load_settings_file/loadSettingsFile.sqf +++ b/optionals/auto_load_settings_file/loadSettingsFile.sqf @@ -5,10 +5,10 @@ if (isFilePatchingEnabled) then { if (_file != "") then { [_file, _source] call EFUNC(settings,import); - diag_log text "[CBA] (settings): Settings file loaded."; + LOG("Settings file loaded."); } else { - diag_log text "[CBA] (settings): Settings file not loaded. File empty or does not exist."; + WARNING("Settings file not loaded. File empty or does not exist."); }; } else { - diag_log text "[CBA] (settings): Cannot load settings file. File patching disabled. Use -filePatching flag."; + WARNING("Cannot load settings file. File patching disabled. Use -filePatching flag."); }; diff --git a/template/static_settings_addon/loadSettingsFile.sqf b/template/static_settings_addon/loadSettingsFile.sqf index 82e7c2220..c3fa6117b 100644 --- a/template/static_settings_addon/loadSettingsFile.sqf +++ b/template/static_settings_addon/loadSettingsFile.sqf @@ -6,4 +6,4 @@ private _source = ["client", "server"] select (isMultiplayer && isServer); private _file = loadFile PATH_SETTINGS_FILE_PBO; [_file, _source] call EFUNC(settings,import); -diag_log text "[CBA] (settings): Settings file loaded from PBO."; +LOG("Settings file loaded from PBO.");