@vite(['resources/css/app.css', 'resources/js/app.js'])
{{-- Header --}}

{{ $logTitle }}

{{ now()->format('Y-m-d H:i:s T') }}

Displaying logs from: {{ $logPath }}

{{-- Note: Search form is not included here as per controller logic (enableSearch=false) --}} {{-- If you wanted search here, you'd add the form like in eid-log-viewer and set enableSearch=true in the controller method --}} @if (!$logExists)

Log file not found at {{ $logPath }}.

@elseif($logEntries->isEmpty())

The log file appears to be empty.

@else {{-- Log Entries Section --}}
@foreach ($logEntries as $index => $entry) @php $level = strtoupper($entry['level'] ?? 'UNKNOWN'); $levelClass = 'log-level-' . $level; // Base classes including hover effect class $baseClasses = 'styled-log-entry p-3 border-l-4 rounded-r-md '; // Fallback if level class not defined in CSS $fallbackClasses = 'bg-white dark:bg-gray-800 border-gray-300 dark:border-gray-600'; @endphp
{{-- Main Log Info (Timestamp, Level, Message) --}}
{{-- Timestamp, Level Badge, Env --}}
{{ $entry['timestamp'] ?? 'N/A' }} {{ $entry['level'] ?? '???' }} {{ $entry['environment'] ?? '?' }}
{{-- Message --}}

{{ $entry['message'] ?? 'No message.' }}

{{-- Context / Stack Trace Area --}} {{-- Use the 'context' field which holds the stack trace string for app logs --}} @if (!empty($entry['context']))
Stack Trace / Context
{{ is_array($entry['context']) ? json_encode($entry['context'], JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE) : $entry['context'] ?? '' }}
@endif
@endforeach
{{-- Pagination Links --}}
{{-- Check if pagination is enabled --}} {{ $logEntries->appends(request()->query())->links() }}
@endif