Panel/docs/features/LOGGING_SYSTEM.md
2026-06-07 16:04:39 -05:00

1.6 KiB

Logging System

Current State

Logging comes from multiple places:

  • agent screen logs
  • console logs
  • update logs
  • scheduler logs
  • admin/logger history

Important references:

  • Panel/modules/gamemanager/log.php
  • Panel/modules/gamemanager/view_server_log.php
  • Panel/modules/gamemanager/get_server_log.php
  • Agent_Linux/ogp_agent.pl
  • Agent-Windows/OGP64/OGP/ogp_agent.pl

What Works

  • live log retrieval exists
  • logs can be fetched through the Panel
  • the viewer can update via AJAX
  • the main game log viewer uses a large monospace output panel

What Still Needs Cleanup

  • better startup failure diagnostics
  • clearer newest-log-file selection
  • better error highlighting
  • better downloadable log history

Log Viewer Layout

Panel/modules/gamemanager/log.php and Panel/modules/gamemanager/view_server_log.php keep the AJAX refresh behavior and render the log in a large dedicated <pre> block:

  • element: #live-server-log.gsp-live-log-panel
  • desktop minimum height around 500px, with 55vh viewport height
  • mobile height around 45vh
  • monospace font
  • preserved line breaks
  • vertical scrolling inside the log panel
  • long-line overflow remains usable without shrinking the panel to one line
  • AJAX refresh updates textContent only; it does not reload the whole page

The live viewer intentionally avoids <textarea> and the generic .log class, because inherited theme styles can make the output appear like a one-line input.

If a future route shows a one-line log again, inspect the actual rendered element first. The fix should be applied to the route that emits the element, not as a broad theme override.