|
|
@@ -16,6 +16,7 @@ if (!is_readable(SERVER_LOGS)) {
|
|
|
|
|
|
$lines = file(SERVER_LOGS);
|
|
|
$search = strtolower($_GET['search'] ?? '');
|
|
|
+$limit = strtolower($_GET['limit'] ?? 50); // A défaut les 50 derniers logs
|
|
|
|
|
|
if ($search) {
|
|
|
$lines = array_filter($lines, fn($line) => stripos($line, $search) !== false);
|
|
|
@@ -31,10 +32,12 @@ $lines = array_reverse($lines);
|
|
|
<meta charset="UTF-8">
|
|
|
<title>Visualiseur de logs</title>
|
|
|
<style>
|
|
|
- body { font-family: monospace; background: #f4f4f4; padding: 20px; }
|
|
|
- .error { color: red; }
|
|
|
+ body { font-family: monospace; background: black !important; padding: 20px; }
|
|
|
+ div { font-size: 0.8em; }
|
|
|
+ .error { color: salmon; }
|
|
|
.warning { color: orange; }
|
|
|
- .notice { color: blue; }
|
|
|
+ .notice { color: white; }
|
|
|
+ .grey { color: grey; }
|
|
|
pre { background: #fff; padding: 10px; border: 1px solid #ccc; overflow-x: auto; }
|
|
|
</style>
|
|
|
<link rel="stylesheet" href="<?php cache::printFileWithTime("libs/bootstrap/assets/dist/css/bootstrap.min.css") ?>">
|
|
|
@@ -42,7 +45,7 @@ $lines = array_reverse($lines);
|
|
|
</head>
|
|
|
<body>
|
|
|
<?php
|
|
|
- foreach (array_slice($lines, 0, 100) as $line) {
|
|
|
+ foreach (array_slice($lines, 0, $limit) as $line) {
|
|
|
serverLog::filtreLog($line);
|
|
|
}
|
|
|
?>
|