System Logs

Monitor system activity and troubleshoot issues

{{-- Log Filters --}}
{{-- Logs Display --}}

Recent Logs

@php $logFiles = glob(storage_path('logs/*.log')); $logs = []; if (!empty($logFiles)) { $latestLogFile = end($logFiles); if (file_exists($latestLogFile)) { $logContent = file_get_contents($latestLogFile); $logLines = array_reverse(explode("\n", trim($logContent))); $logs = array_slice($logLines, 0, 50); // Show last 50 entries } } @endphp @forelse($logs as $log) @php // Parse log line (Laravel log format) preg_match('/^\[(\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2})\] (\w+)\.(\w+): (.+)$/', $log, $matches); if ($matches) { $timestamp = $matches[1]; $environment = $matches[2]; $level = $matches[3]; $message = $matches[4]; } else { $timestamp = 'Unknown'; $level = 'unknown'; $message = $log; } @endphp
{{ strtoupper($level) }} {{ $timestamp }}

{{ $message }}

@empty

No logs found

System logs will appear here when available.

@endforelse
{{-- Log Statistics --}}

Total Logs

{{ count($logs) }}

Errors

{{ count(array_filter($logs, function($log) { return stripos($log, '.ERROR:') !== false; })) }}

Warnings

{{ count(array_filter($logs, function($log) { return stripos($log, '.WARNING:') !== false; })) }}

Info

{{ count(array_filter($logs, function($log) { return stripos($log, '.INFO:') !== false; })) }}