tag:support.pimpmylog.com,2013-12-07:/discussions/questions/79-multiple-log-formatPimp my Log: Discussion 2016-09-20T16:32:30Ztag:support.pimpmylog.com,2013-12-07:Comment/393399722016-03-07T08:20:29Z2016-03-07T08:20:30ZMultiple log format<div><p>hi , I have a log file with 2 different line formats:<br>
18:58:08,794 |-INFO in
ch.qos.logback.classic.joran.JoranConfigurator@6b09fb41 -
Registering current configuration as safe fallback point<br>
2016-03-04 18:58:17.903:INFO:oejs.Server:main: Started @26613ms</p>
<p>Can I merge both in the same file configuration? ,currently I
have 2 different file entrys in my conf.user</p></div>Adriantag:support.pimpmylog.com,2013-12-07:Comment/393399722016-04-06T06:53:23Z2016-04-06T06:53:23ZMultiple log format<div><p>Hi,</p>
<p>yes it is possible but a little bit tricky to do. You need to
:</p>
<ol>
<li>Find a regex matching both kind of lines. It is not really
complicated because you can just build <code>^(first regex for
first type | second regex for second type)$</code><br></li>
<li>Match severity, for exemple, will be the string concatenation
of first severity token and second severity token</li>
</ol>
<p>What I don't really like in your log file (except that there are
both kind of log lines) is the date/time format which is not the
same and date is missing in <code>18:58:08,794 |-INFO in c</code>
for example... So sorting will not work, etc...</p></div>potsky