fix(log): preserve leading whitespace in logs (#7879)

This commit is contained in:
Aleksander Lis
2026-01-05 21:32:34 +01:00
committed by GitHub
parent c406afddaf
commit 7c075551ff

View File

@@ -435,7 +435,7 @@
// Parse timestamp from log line (ISO 8601 format: 2025-12-04T11:48:39.136764033Z) // Parse timestamp from log line (ISO 8601 format: 2025-12-04T11:48:39.136764033Z)
$timestamp = ''; $timestamp = '';
$logContent = $line; $logContent = $line;
if (preg_match('/^(\d{4})-(\d{2})-(\d{2})T(\d{2}:\d{2}:\d{2})(?:\.(\d+))?Z?\s*(.*)$/', $line, $matches)) { if (preg_match('/^(\d{4})-(\d{2})-(\d{2})T(\d{2}:\d{2}:\d{2})(?:\.(\d+))?Z?\s(.*)$/', $line, $matches)) {
$year = $matches[1]; $year = $matches[1];
$month = $matches[2]; $month = $matches[2];
$day = $matches[3]; $day = $matches[3];