Parses a system log string into an array of structured SystemLogLine objects.
Each log entry is expected to start with a timestamp in the format YYYY-MM-DD HH:MM:SS.sss.
The function uses a regular expression to split the content into individual log entries,
then parses each entry into a SystemLogLine using parseSystemLogLine.
Returns
An array of SystemLogLine objects representing each parsed log entry.
Example
constlogContent = '2025-12-05 10:01:23.123 Info: started\n2025-12-05 10:01:24.456 Error: failed'; constlines = parseSystemLogContent(logContent); console.log(lines[0].timestamp); // → Date object for '2025-12-05 10:01:23.123'
Remarks
Entries that cannot be parsed by parseSystemLogLine are ignored.
The regular expression uses the s (dotAll) flag, which may not be supported in all browsers;
a @ts-ignore is used to suppress TypeScript warnings.
Parses a system log string into an array of structured
SystemLogLineobjects.Each log entry is expected to start with a timestamp in the format
YYYY-MM-DD HH:MM:SS.sss. The function uses a regular expression to split the content into individual log entries, then parses each entry into aSystemLogLineusingparseSystemLogLine.Returns
An array of
SystemLogLineobjects representing each parsed log entry.Example
Remarks
parseSystemLogLineare ignored.s(dotAll) flag, which may not be supported in all browsers; a@ts-ignoreis used to suppress TypeScript warnings.