LogViewPlus Support

Mixed parsed log - is it possible?

https://www.logviewplus.com/forum/Topic2004.aspx

By jack_t - 10 Jan 2024

what is the correct way to parse a log like this?


01:06:17.577 statuscode: 2,09
01:06:17.577 statuscode: 0,21
01:06:17.581

******************************************************************

01:06:17.581 <transaction>
<customer-language>en</customer-language>
<shop>
  <code>7</code>
  <description>MAIN</description>
</shop>
</transaction>
01:06:17.581

******************************************************************
01:06:17.577 statuscode: 3,12
01:06:17.730 MainEvent: BarcodeCommand Enable
01:06:17.730 End InitTransaction
By LogViewPlus Support - 10 Jan 2024

Hi Jack,

This is a tricky log file because you actually have multiple formats in the same file (the log entries have different metadata).  The Basic Parser (default parse) does a pretty good job.  You can set this parser type explicitly in Parser Mappings.





Alternatively, you can use a multi-pattern with a Pattern Parser to get a result that is a little bit better.
%d{HH:mm:ss.fff} %m%n
%d{HH:mm:ss.fff}%n%m%n






Hope that helps,

Toby