Structured JSON Logging
Fully compatible with Elasticsearch, Datadog, Grafana Loki, and modern APM tools.
coe_loggingStructured Logging & Telemetry
Real-Time Telemetry & High-Precision Structured JSON Logs
coe_supervisor
coe_logging
2 exports · 0 commands
Runs without a NUI: nothing is rendered on the client and the resource stays idle until events arrive.
Engineered for high-concurrency production environments, coe_logging provides structured JSON log outputs, colored console formatting, and asynchronous daily log rotation. Enables tracking player requests, network events, and runtime anomalies with rich contextual tags (StateID, Source, Timestamp UTC).
Asynchronous non-blocking file I/O off the main FiveM Enhanced tick thread, guaranteeing heavy logging under 300+ player peaks never causes server FPS drops.
Fully compatible with Elasticsearch, Datadog, Grafana Loki, and modern APM tools.
Configurable TRACE, DEBUG, INFO, WARN, ERROR, and FATAL levels per resource at runtime.
Isolates logs specifically for banking transactions, combat logs, or inventory events.
Intelligent in-memory buffer pool avoids synchronous disk writes on the game loop.
Every COE Framework script strictly follows the principle of separation of concerns. Interact with the 3D stack below:
Operates strictly within layers L1–L3 (domain, HAL, and server-authoritative application logic). Visual interactions and management flows are delegated to centralized ecosystem apps (coe_ui / coe_tablet), guaranteeing 0.00 ms idle client overhead in FiveM DX12.
Manage your city without relying on developers. Runtime parameters, auditing, and ACE-protected commands:
IsPlayerAceAllowed(src, "coe.admin")
exports.coe_audit:Record(severity, category, event, context)
Clean Architecture & HAL
Typed contracts to call from other resources. Full types live in types.lua and in the docs reference.
exports['coe_logging']:Log(level, category, event, context)
→ boolean, string|nil
Emits a structured log line (JSON or formatted according to server convars). The invoking resource is automatically recorded as the `resource` field.
| Parameter | Type |
|---|---|
level | CoeLogLevel |
category | string |
event | string |
context | table|nil |
local ok, detail = exports['coe_logging']:Log(level, category, event, context)exports['coe_logging']:GetRecent(limit)
→ table|nil, string|nil
Retorna as entradas recentes mantidas no buffer circular Zero-GC em memória. Exige permissão ACE coe.logging.log do recurso chamador.
| Parameter | Type |
|---|---|
limit | integer|nil |
local ok, detail = exports['coe_logging']:GetRecent(limit)This module registers no commands: it is driven by exports and events.