Lines with Different Pattern


Author
Message
Email User
Email User
Gaining Respect (189 reputation)Gaining Respect (189 reputation)Gaining Respect (189 reputation)Gaining Respect (189 reputation)Gaining Respect (189 reputation)Gaining Respect (189 reputation)Gaining Respect (189 reputation)Gaining Respect (189 reputation)Gaining Respect (189 reputation)
Group: Forum Members
Posts: 36, Visits: 106
Hello,

I am trying to make use of LogViewPlus by defining a custom expression for Pattern Parsing.
Right now I have this pattern: 

[%d][%S{File}:%s{Function}:%s{Line}]%m%n

But not all of my lines have this pattern, some of them have only

[%d]%m%n

How can I setup the pattern to give me empty strings of File, Function and Line columns when they are missing.
Right now the parser stop loading any lines when the first line that doesn't matches the pattern is encountered.

Thanks! Regards
LogViewPlus Support
LogViewPlus Support
Supreme Being (5.3K reputation)Supreme Being (5.3K reputation)Supreme Being (5.3K reputation)Supreme Being (5.3K reputation)Supreme Being (5.3K reputation)Supreme Being (5.3K reputation)Supreme Being (5.3K reputation)Supreme Being (5.3K reputation)Supreme Being (5.3K reputation)
Group: Moderators
Posts: 1.1K, Visits: 3.7K

Hi,

Have you tried using a multi-pattern?  This is described here:
https://www.logviewplus.com/docs/pattern_parser.html

It is also a good idea to specify the date format explicitly. Especially if the date formats differ.  Please see:
https://www.logviewplus.com/docs/date_specifier.html

Thanks,

Toby


Email User
Email User
Gaining Respect (189 reputation)Gaining Respect (189 reputation)Gaining Respect (189 reputation)Gaining Respect (189 reputation)Gaining Respect (189 reputation)Gaining Respect (189 reputation)Gaining Respect (189 reputation)Gaining Respect (189 reputation)Gaining Respect (189 reputation)
Group: Forum Members
Posts: 36, Visits: 106

Hello Toby,

Thanks for the tip!

But what if I have an arbitrary number of spaces at the begining of the line, before [%d], the is any format like regex \s* ?

LogViewPlus Support
LogViewPlus Support
Supreme Being (5.3K reputation)Supreme Being (5.3K reputation)Supreme Being (5.3K reputation)Supreme Being (5.3K reputation)Supreme Being (5.3K reputation)Supreme Being (5.3K reputation)Supreme Being (5.3K reputation)Supreme Being (5.3K reputation)Supreme Being (5.3K reputation)
Group: Moderators
Posts: 1.1K, Visits: 3.7K
I don't think the PatternParser will be able to handle that scenario.  You may be better off using the BasicParser.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Login

Explore
Messages
Mentions
Search