You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi everyone,
I’m looking for suggestions on how to process the attached log file (I receive it via docker logs).
The ideal parsing rule in my view would be:
If a line starts with [Error] or [Info], then the message should continue until the next empty line.
Otherwise, each line should be a separate message.
I’ve already tried implementing a solution myself (attached), but there’s one issue:
it groups even the single-line messages together. It’s not a big problem, but I’d be curious if there’s a cleaner or more robust approach.
Is there a way to pass a tag/marker in the pipeline to indicate that the next message belongs to a multi-line block?
Thanks any suggestions!
Log source:
wall clock duration warning: isolate: f11c111a-11a1-1c11-11a1-1aaf111b11d1
early termination has been triggered: isolate: f11c111a-11a1-1c11-11a1-1aaf111b11d1
serving the request with /home/deno/functions/function-name
[Info] Listening on http://localhost:1111/
[Error] {
endpoint: "function-name",
ip: "127.0.0.1",
trace: "c11f11c1df11c1111c1b1c111dc11111",
message: {
_errors: [],
title: { _errors: [ "String must contain at least 5 character(s)" ] }
}
}
wall clock duration warning: isolate: f11c111a-11a1-1c11-11a1-1aaf111b11d1
early termination has been triggered: isolate: f11c111a-11a1-1c11-11a1-1aaf111b11d1
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Question
Hi everyone,
I’m looking for suggestions on how to process the attached log file (I receive it via docker logs).
The ideal parsing rule in my view would be:
If a line starts with [Error] or [Info], then the message should continue until the next empty line.
Otherwise, each line should be a separate message.
I’ve already tried implementing a solution myself (attached), but there’s one issue:
it groups even the single-line messages together. It’s not a big problem, but I’d be curious if there’s a cleaner or more robust approach.
Is there a way to pass a tag/marker in the pipeline to indicate that the next message belongs to a multi-line block?
Thanks any suggestions!
Log source:
Vector Config
Vector Logs
No response
Beta Was this translation helpful? Give feedback.
All reactions