logs: standardise log filenames to xamxam-{service}-{date}.log

This commit is contained in:
Pontoporeia
2026-08-24 11:34:34 +02:00
parent 7b6d79c133
commit d2cef85966
25 changed files with 442 additions and 83 deletions
+8 -1
View File
@@ -33,6 +33,12 @@ if (!in_array($selectedN, SystemController::ALLOWED_LINES, true)) {
$selectedN = 100;
}
// Optional date selection (YYYY-MM-DD) for daily app logs.
$selectedDate = $_GET['date'] ?? null;
if ($selectedDate !== null && !preg_match('/^\d{4}-\d{2}-\d{2}$/', $selectedDate)) {
$selectedDate = null;
}
header('Content-Type: text/html; charset=utf-8');
header('X-Robots-Tag: noindex');
@@ -42,11 +48,12 @@ $_cache = new SystemCache($_db->getPDO());
$_controller = new SystemController($_db, $_cache);
// ── Render ─────────────────────────────────────────────────────────────────
$logData = $_controller->getLogData($activeTab, $selectedN);
$logData = $_controller->getLogData($activeTab, $selectedN, $selectedDate);
$logLines = $logData['lines'];
$logError = $logData['error'];
$logFileMeta = $logData['meta'];
$logIsJson = $logData['isJson'] ?? false;
$notYet = $logData['notYet'] ?? false;
$logDates = SystemController::listLogDates($activeTab);
include APP_ROOT . '/templates/admin/partials/system-log-panel.php';