fix: syslog parser TS strict null check, deploy script
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -18,7 +18,7 @@ function parseSyslogLine(raw: string): { program: string; message: string } {
|
||||
// Try to extract program and message after the timestamp + hostname
|
||||
// RFC 3164: "Mon DD HH:MM:SS HOSTNAME PROGRAM[PID]: MESSAGE"
|
||||
const match = noPri.match(/^\w+\s+\d+\s+[\d:]+\s+\S+\s+(\S+?)(?:\[\d+\])?:\s*(.*)/);
|
||||
if (match) {
|
||||
if (match?.[1] && match[2] !== undefined) {
|
||||
return { program: match[1], message: match[2] };
|
||||
}
|
||||
// Fallback: just return the whole line
|
||||
|
||||
Reference in New Issue
Block a user