How to skip log entries that cannot be parsed


Author
Message
Ace
Ace
New Member (15 reputation)New Member (15 reputation)New Member (15 reputation)New Member (15 reputation)New Member (15 reputation)New Member (15 reputation)New Member (15 reputation)New Member (15 reputation)New Member (15 reputation)
Group: Forum Members
Posts: 2, Visits: 7
My IDE outputs some logs that do not match my formatted logs.
This causes LogViewPlus to not be able to open the file.
Is there a way to simply have the application skip entries it cannot parse?

thanks,
David
Replies
Ace
Ace
New Member (15 reputation)New Member (15 reputation)New Member (15 reputation)New Member (15 reputation)New Member (15 reputation)New Member (15 reputation)New Member (15 reputation)New Member (15 reputation)New Member (15 reputation)
Group: Forum Members
Posts: 2, Visits: 7
Thanks Toby...

Here is the part of the log that is giving me trouble:
The log starts with these series of characters, then newline, then my logs start...


How do I write a pattern for this?

The pattern for my logs is:
%d{yyyy-MM-dd %H:mm:ss}    %S{Type}    %S{Source}    %S{Msg}%n

Now I want to add a new pattern for:


I tried regex for exactly 10 chars - I want to ignore any line with exactly 10 chars.
/^..........$/gm

But if I check the "regex" i would think my original pattern would stop working.

Regardless, it tells me "minimum of two elements must be found"

any approach you would take?

LogViewPlus Support
LogViewPlus Support
Supreme Being (12K reputation)Supreme Being (12K reputation)Supreme Being (12K reputation)Supreme Being (12K reputation)Supreme Being (12K reputation)Supreme Being (12K reputation)Supreme Being (12K reputation)Supreme Being (12K reputation)Supreme Being (12K reputation)
Group: Moderators
Posts: 1.2K, Visits: 4.3K
The text:


Cannot be used to represent a log entry because no timestamp can be determined.

However, I don't think this text is causing the problem.  LogViewPlus should be appending this text to the next (or first) log entry.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Login

Explore
Messages
Mentions
Search