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
Lines with Different Pattern
Posted on Nov 8, 2018 at 7:37 PM
Posted on Nov 8, 2018 at 7:37 PM
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
Posted on Nov 8, 2018 at 7:38 PM
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* ?
Posted on Nov 8, 2018 at 7:38 PM
I don't think the PatternParser will be able to handle that scenario. You may be better off using the BasicParser.
This topic is closed and cannot receive new replies.