mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-09-25 01:53:03 +02:00
logs: standardise log filenames to xamxam-{service}-{date}.log
This commit is contained in:
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user