mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
Merge pull request #1264 from Dokploy/1202-dates-are-not-shown-in-logs
fix: don't cut log
This commit is contained in:
commit
e1b114a63b
@ -63,18 +63,10 @@ export function parseLogs(logString: string): LogLine[] {
|
||||
|
||||
if (!message?.trim()) return null;
|
||||
|
||||
// Delete other timestamps and keep only the one from --timestamps
|
||||
const cleanedMessage = message
|
||||
?.replace(
|
||||
/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?Z|\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\.\d{3} UTC/g,
|
||||
"",
|
||||
)
|
||||
.trim();
|
||||
|
||||
return {
|
||||
rawTimestamp: timestamp ?? null,
|
||||
timestamp: timestamp ? new Date(timestamp.replace(" UTC", "Z")) : null,
|
||||
message: cleanedMessage,
|
||||
message: message.trim(),
|
||||
};
|
||||
})
|
||||
.filter((log) => log !== null);
|
||||
|
Loading…
Reference in New Issue
Block a user