|
|
@@ -23,18 +23,6 @@ if ($search) {
|
|
|
|
|
|
$lines = array_reverse($lines);
|
|
|
|
|
|
-function printLog(string $_log){
|
|
|
- if (stripos($_log, 'error') !== false) {
|
|
|
- echo '<div class="error">' . $_log . '</div>';
|
|
|
- } elseif (stripos($_log, 'warn') !== false) {
|
|
|
- echo '<div class="warning">' . $_log . '</div>';
|
|
|
- } elseif (stripos($_log, 'notice') !== false) {
|
|
|
- echo '<div class="notice">' . $_log . '</div>';
|
|
|
- } else {
|
|
|
- echo '<div>' . $_log . '</div>';
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
?>
|
|
|
|
|
|
<!DOCTYPE html>
|
|
|
@@ -49,6 +37,8 @@ function printLog(string $_log){
|
|
|
.notice { color: blue; }
|
|
|
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") ?>">
|
|
|
+ <script src="<?php cache::printFileWithTime("libs/bootstrap/js/bootstrap.min.js") ?>"></script>
|
|
|
<script>
|
|
|
setInterval(() => {
|
|
|
location.reload();
|
|
|
@@ -56,24 +46,10 @@ function printLog(string $_log){
|
|
|
</script>
|
|
|
</head>
|
|
|
<body>
|
|
|
- <form method="get">
|
|
|
- <label for="search">Filtrer par mot-clé :</label>
|
|
|
- <input type="text" name="search" value="<?= htmlspecialchars($search) ?>">
|
|
|
- <button type="submit">Filtrer</button>
|
|
|
- </form>
|
|
|
- <hr>
|
|
|
- <pre>
|
|
|
<?php
|
|
|
foreach (array_slice($lines, 0, 100) as $line) {
|
|
|
- if(stripos($line, DOCUMENT_ROOT) !== false){
|
|
|
- printLog($line);
|
|
|
- } elseif(stripos($line, DOMAIN_CMS) !== false){
|
|
|
- printLog($line);
|
|
|
- } elseif(stripos($line, "/var/www/") == false AND stripos($line, "https://") == false){
|
|
|
- printLog($line);
|
|
|
- }
|
|
|
+ serverLog::filtreLog($line);
|
|
|
}
|
|
|
?>
|
|
|
- </pre>
|
|
|
</body>
|
|
|
</html>
|