|
|
@@ -21,6 +21,16 @@ if ($search) {
|
|
|
$lines = array_filter($lines, fn($line) => stripos($line, $search) !== false);
|
|
|
}
|
|
|
|
|
|
+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>';
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
?>
|
|
|
|
|
|
<!DOCTYPE html>
|
|
|
@@ -51,14 +61,12 @@ if ($search) {
|
|
|
<hr>
|
|
|
<pre>
|
|
|
<?php foreach (array_slice($lines, -50) as $line) {
|
|
|
- if(stripos($line, DOCUMENT_ROOT) !== false OR stripos($line, "/var/www/") === false){
|
|
|
- if (stripos($line, 'error') !== false) {
|
|
|
- echo '<div class="error">' . $line . '</div>';
|
|
|
- } elseif (stripos($line, 'warn') !== false) {
|
|
|
- echo '<div class="warning">' . $line . '</div>';
|
|
|
- } elseif (stripos($line, 'notice') !== false) {
|
|
|
- echo '<div class="notice">' . $line . '</div>';
|
|
|
- }
|
|
|
+ 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);
|
|
|
}
|
|
|
} ?>
|
|
|
</pre>
|