Shorten timestamp display format in runtime logs

Changed from '2025-Dec-18 11:39:13.685710' to '2025-Dec-18 11:39:13'.
Microseconds are still used in wire:key for uniqueness.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Andras Bacsai 2025-12-18 12:50:30 +01:00
parent deb79cf050
commit 9fdb799663

View file

@ -408,13 +408,13 @@ class="text-gray-500 dark:text-gray-400 py-2">
$monthNames = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
$monthName = $monthNames[(int)$month - 1] ?? $month;
// Format: 2025-Dec-04 09:44:58.198879
$timestamp = "{$year}-{$monthName}-{$day} {$time}.{$microseconds}";
// Format for display: 2025-Dec-04 09:44:58
$timestamp = "{$year}-{$monthName}-{$day} {$time}";
// Include microseconds in key for uniqueness
$lineKey = "{$timestamp}.{$microseconds}";
}
// Use timestamp for stable key (unique per log line)
$lineKey = $timestamp ?: 'line-' . $index;
@endphp
<div wire:key="{{ $lineKey }}" data-log-line data-log-content="{{ $line }}" class="flex gap-2 log-line">
<div wire:key="{{ $lineKey ?? 'line-' . $index }}" data-log-line data-log-content="{{ $line }}" class="flex gap-2 log-line">
@if ($timestamp && $showTimeStamps)
<span class="shrink-0 text-gray-500">{{ $timestamp }}</span>
@endif