Jacob Schmidt ebfe77a340 feat: implement complete Forge framework with Rust/Redis backend and Arma 3 integration
Implemented features:
- High-performance Rust extension with Redis persistence
- Actor/player management with loadout, position, and state tracking
- Banking system with deposit, withdraw, and transfer operations
- Physical and virtual garage/locker systems for vehicle and equipment storage
- Organization management with member tracking and permissions
- Client-side UI with React-like state management
- Server-side event-driven architecture with CBA Events
- Security: Self-transfer prevention at multiple layers
- Logging system with per-module log files
- ICOM module for inter-server communication

Co-Authored-By: Warp <agent@warp.dev>
2026-01-04 12:52:15 -06:00

54 lines
1.7 KiB
Plaintext

#include "..\script_component.hpp"
/*
* File: fnc_log.sqf
* Author: IDSolutions
* Date: 2026-01-03
* Last Update: 2026-01-03
* Public: No
*
* Description:
* Writes a log entry.
*
* Parameter(s):
* 0: Log level <STRING> (DEBUG, INFO, ERROR, WARNING, VERBOSE)
* 1: Message to log <STRING>
* 2: File that's being logged <STRING>
* 3: File that called the file being logged <STRING> (Optional)
* 4: Stack trace <BOOL> (Default: false)
* 5: Identifier <STRING> (Default: "FORGE")
*
* Returns:
* N/A
*
* Example(s):
* ["ERROR", "Ooh, something went wrong"] call para_g_fnc_log;
*/
params ["_logLevel", "_message", "_file", "_callingFile", ["_stackTrace", false, [false]], ["_identifier", "FORGE", [""]]];
if (is3DENPreview) exitWith { diag_log text format ["[%1] %2: %3", _identifier, _logLevel, _message]; };
if !(_logLevel in ["DEBUG", "INFO", "ERROR", "WARNING", "VERBOSE"]) exitWith { diag_log text format ["[%1] ERROR: Invalid log level '%2'", _identifier, _logLevel]; };
if (_stackTrace) then {
private _trace = diag_stacktrace;
private _traceText = _trace apply { format ["%1 (Line %2)", _x # 0, _x # 1] } joinString endl;
_message = _traceText;
};
private _timestamp = format (["%1-%2-%3 %4:%5:%6:%7"] + systemTimeUTC);
if (isNil "_file") then { _file = ["", _fnc_scriptName] select (!isNil "_fnc_scriptName"); };
if (isNil "_callingFile" && !isNil "_fnc_scriptNameParent") then { _callingFile = _fnc_scriptNameParent; };
private _callingFileText = if !(isNil "_callingFile") then { format ["Called By: %1 |", _callingFile] } else { "" };
diag_log text format [
"%1 | %2 | %3 | File: %4 | %5 | %6",
_timestamp,
_identifier,
_logLevel,
_file,
_callingFileText,
_message
];