Skip to content

Are logs with different message formats supported in one file? #1255

Answered by tstack
maxim-lbmv asked this question in Q&A
Discussion options

You must be logged in to vote

Sorry, no, lnav expects a single format per file. There can be multiple regex patterns in a format, though.

The reason is that lnav uses the regex patterns to find the start of a log message. If none of the patterns in a format match a given line, then it's considered a continuation of the current log message. Supporting multiple log formats in a single file would mean that we would have to try every single pattern whenever a mismatch occurred, which would seriously affect performance.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by maxim-lbmv
Comment options

You must be logged in to vote
2 replies
@tstack
Comment options

@maxim-lbmv
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants