mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-07-20 11:36:07 +00:00
feat(admin): add transparent debug error-log mode
Add an admin-controlled debug mode that captures PHP errors of all players into var/log/debug-players.log, to hunt remaining PHP 8.3 bugs from real play sessions. Fully transparent to players: no redirect, no gameplay change, errors are never displayed. - DB: new debug_log table (one row), mirroring the maintenance pattern. - Database: getDebugMode()/setDebugMode()/setDebugSettings(), defensive when the table is absent (no blank page). - Session: register a custom error + shutdown handler when enabled; the handler runs even when php.ini error_reporting masks warnings/notices, so capture is complete without a Docker rebuild. Auto-disables after a configurable window. - DebugErrorLogger: size-capped file with a single .log.1 rotation, honours the @ operator, never throws. - Admin: new "Debug Error Log" page (levels, size cap, auto-off, on-page viewer, clear, download) + debugLog action mod. - Menu: admin-only quick on/off widget (TZ_DEBUG_ON/OFF, EN/FR/RO). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
committed by
Catalin Novgorodschi
parent
63c94fa961
commit
827354a622
@@ -1932,6 +1932,8 @@ tz_def('TZ_CONSTRUCT_WAREHOUSE', 'Construct Warehouse.');
|
||||
tz_def('TZ_CP_DAY', 'CP/day');
|
||||
tz_def('TZ_CROP_25_5_GOLD', 'Crop +25% (5 gold)');
|
||||
tz_def('TZ_DATE_AND_TIME', 'Date and time');
|
||||
tz_def('TZ_DEBUG_OFF', 'Debug log OFF');
|
||||
tz_def('TZ_DEBUG_ON', 'Debug log ON');
|
||||
tz_def('TZ_DECLARE_WAR', 'declare war');
|
||||
tz_def('TZ_DEFAULT', 'Default:');
|
||||
tz_def('TZ_DELETE_ACCOUNT', 'Delete account?');
|
||||
|
||||
Reference in New Issue
Block a user