<div dir="ltr"><div>Thanks for the test case. That's helpful.<br><br>While similar, this problem is actually different from the first. Originally, the layout pattern couldn't be parsed. With that problem fixed, the parser now trips up on the input line. It sounds like the logger-name parser is using a greedy regex matcher (similar to the problem with the layout pattern). I'll look into this tonight.<br>

<br></div>Tony<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jun 12, 2013 at 11:30 AM,  <span dir="ltr"><<a href="mailto:michael.cox@ubs.com" target="_blank">michael.cox@ubs.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div link="blue" vlink="purple" lang="DE-CH"><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-GB">I so I picked up your latest<u></u><u></u></span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-GB"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-GB">Does not work for me<u></u><u></u></span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-GB"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-GB">Test case:<u></u><u></u></span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-GB"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New";color:#1f497d" lang="EN-GB">2013-06-12 15:27:15.044 INFO  [main] KdbFxFeedhandlerApp: Running com.ubs.sprint.kdb.fx.feedhandler.server.KdbFxFeedhandlerApp from directory: /sbclocal/sprint/kdb-fx-feedhandler/0.0.23/bin/.\n</span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-GB"><u></u><u></u></span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-GB"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-GB">Pattern:<u></u><u></u></span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-GB"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New";color:#1f497d" lang="EN-GB">%d{yyyy-MM-dd HH:mm:ss.SSS,UTC} %-5level [%thread] %logger{0}: %msg%n<u></u><u></u></span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-GB"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-GB">Logger name now seems to consume the message up to the 2<sup>nd</sup> colon. One would have hoped it would stop at the first colon.<u></u><u></u></span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-GB"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-GB">Michael<u></u><u></u></span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-GB"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-GB">Note I added the two simple parsers like MessageParser to capture logger and thread into the Log event<u></u><u></u></span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-GB"><u></u> <u></u></span></p><p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"" lang="EN-US">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"" lang="EN-US"> logback-dev [mailto:<a href="mailto:logback-dev-bounces@qos.ch" target="_blank">logback-dev-bounces@qos.ch</a>] <b>On Behalf Of </b>Tony Trinh<br>

<b>Sent:</b> 10 June 2013 04:56<br><b>To:</b> logback developers list<br><b>Subject:</b> Re: [logback-dev] logback-decoder<u></u><u></u></span></p><div><div class="h5"><p class="MsoNormal"><span lang="EN-GB"><u></u> <u></u></span></p>

<div><div><p class="MsoNormal">Hi Michael,<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">logback-decoder is definitely open to volunteers :)  not abandoned.<u></u><u></u></p>

</div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">I've fixed the bug you've discovered [1]. Let me know if that works for you.<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p>

</div><div><p class="MsoNormal">Thanks,<u></u><u></u></p></div><div><p class="MsoNormal">Tony<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">[1] <a href="https://github.com/qos-ch/logback-decoder/issues/1" target="_blank">https://github.com/qos-ch/logback-decoder/issues/1</a><u></u><u></u></p>

</div></div><div><p class="MsoNormal" style="margin-bottom:12.0pt"><u></u> <u></u></p><div><p class="MsoNormal">On Fri, Jun 7, 2013 at 2:51 AM, <<a href="mailto:michael.cox@ubs.com" target="_blank">michael.cox@ubs.com</a>> wrote:<u></u><u></u></p>

<div><div><p class="MsoNormal"><span lang="EN-GB">Hi,</span><u></u><u></u></p><p class="MsoNormal"><span lang="EN-GB"> </span><u></u><u></u></p><p class="MsoNormal"><span lang="EN-GB">I'm trying to use this component – aware that it is in early dev stages but with the intention of contributing back fixes.</span><u></u><u></u></p>

<p class="MsoNormal"><span lang="EN-GB"> </span><u></u><u></u></p><p class="MsoNormal"><span lang="EN-GB">For example I have made some changes to allow handling of date patterns with a timezone e..g</span><u></u><u></u></p>

<p class="MsoNormal"><span lang="EN-GB"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-family:"Courier New"" lang="EN-GB">%d{yyyy-MM-dd HH:mm:ss.SSS,UTC}</span><u></u><u></u></p><p class="MsoNormal">

<span lang="EN-GB"> </span><u></u><u></u></p><p class="MsoNormal"><span lang="EN-GB">I have also added parsers for </span><span style="font-family:"Courier New"" lang="EN-GB">%thread</span><span lang="EN-GB"> and </span><span style="font-family:"Courier New"" lang="EN-GB">%logger</span><span lang="EN-GB">.</span><u></u><u></u></p>

<p class="MsoNormal"><span lang="EN-GB"> </span><u></u><u></u></p><p class="MsoNormal"><span lang="EN-GB">I'm coming unstuck with a few types of pattern e.g.</span><u></u><u></u></p><p class="MsoNormal"><span lang="EN-GB"> </span><u></u><u></u></p>

<p class="MsoNormal"><span style="font-family:"Courier New"" lang="EN-GB">%d{yyyy-MM-dd HH:mm:ss.SSS  %-5logger %msg</span><u></u><u></u></p><p class="MsoNormal"><span lang="EN-GB"> </span><u></u><u></u></p><p class="MsoNormal">

<span lang="EN-GB">Will parse </span><u></u><u></u></p><p class="MsoNormal"><span lang="EN-GB"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-family:"Courier New"" lang="EN-GB">"2013-06-07 10:00:00.999 ERROR rest of my log message"</span><u></u><u></u></p>

<p class="MsoNormal"><span lang="EN-GB"> </span><u></u><u></u></p><p class="MsoNormal"><span lang="EN-GB">But will fail to parse  </span><u></u><u></u></p><p class="MsoNormal"><span lang="EN-GB"> </span><u></u><u></u></p>

<p class="MsoNormal"><span style="font-family:"Courier New"" lang="EN-GB">"2013-06-07 10:00:00.999 INFO  rest of my log message"</span><u></u><u></u></p><p class="MsoNormal"><span lang="EN-GB"> </span><u></u><u></u></p>

<p class="MsoNormal"><span lang="EN-GB">(reducing the two spaces after INFO to one makes it parseable)</span><u></u><u></u></p><p class="MsoNormal"><span lang="EN-GB"> </span><u></u><u></u></p><p class="MsoNormal"><span lang="EN-GB">And also anything like </span><span style="font-family:"Courier New"" lang="EN-GB">%logger{0}</span><span lang="EN-GB"> seems to confuse matching no end. IN debug mode it looks like the date pattern is considered to be the whole pattern and it fails to see the } at the end of %d{….}:</span><u></u><u></u></p>

<p class="MsoNormal"><span lang="EN-GB"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-family:"Courier New"" lang="EN-GB">08:46:01.510 [main] DEBUG ch.qos.logback.decoder.Decoder - date = 2013-06-07 05:03:28.853</span><u></u><u></u></p>

<p class="MsoNormal"><span style="font-family:"Courier New"" lang="EN-GB">08:46:01.514 [main] ERROR ch.qos.logback.decoder.DateParser - java.lang.IllegalArgumentException: Illegal pattern character 'U'</span><u></u><u></u></p>

<p class="MsoNormal"><span style="font-family:"Courier New"" lang="EN-GB">08:46:01.514 [main] DEBUG ch.qos.logback.decoder.Decoder - level = INFO</span><u></u><u></u></p><p class="MsoNormal"><span style="font-family:"Courier New"" lang="EN-GB">08:46:01.515 [main] DEBUG ch.qos.logback.decoder.Decoder - BUG!! Saw a field name that did not match the pattern info's name! (index=1 expected=level actual=message)</span><u></u><u></u></p>

<p class="MsoNormal"><span style="font-family:"Courier New"" lang="EN-GB">08:46:01.515 [main] DEBUG ch.qos.logback.decoder.Decoder - thread = main</span><u></u><u></u></p><p class="MsoNormal"><span style="font-family:"Courier New"" lang="EN-GB">08:46:01.515 [main] DEBUG ch.qos.logback.decoder.Decoder - BUG!! Saw a field name that did not match the pattern info's name! (index=2 expected=thread actual=n)</span><u></u><u></u></p>

<p class="MsoNormal"><span style="font-family:"Courier New"" lang="EN-GB">08:46:01.516 [main] DEBUG ch.qos.logback.decoder.Decoder - logger = KdbFxFeedhandlerApp</span><u></u><u></u></p><p class="MsoNormal"><span style="font-family:"Courier New"" lang="EN-GB"> </span><u></u><u></u></p>

<p class="MsoNormal"><span style="font-family:"Courier New"" lang="EN-GB">java.lang.IndexOutOfBoundsException: Index: 3, Size: 3</span><u></u><u></u></p><p class="MsoNormal"><span style="font-family:"Courier New"" lang="EN-GB">     at java.util.LinkedList.checkElementIndex(LinkedList.java:553)</span><u></u><u></u></p>

<p class="MsoNormal"><span style="font-family:"Courier New"" lang="EN-GB">     at java.util.LinkedList.get(LinkedList.java:474)</span><u></u><u></u></p><p class="MsoNormal"><span style="font-family:"Courier New"" lang="EN-GB">     :</span><u></u><u></u></p>

<p class="MsoNormal"><span lang="EN-GB"> </span><u></u><u></u></p><p class="MsoNormal"><span lang="EN-GB">Remove the </span><span style="font-family:"Courier New"" lang="EN-GB">{0}</span><span lang="EN-GB"> from the end of logger and it all works.</span><u></u><u></u></p>

<p class="MsoNormal"><span lang="EN-GB"> </span><u></u><u></u></p><p class="MsoNormal"><span lang="EN-GB">Can anyone advise on how these last two could be fixed?</span><u></u><u></u></p><p class="MsoNormal"><span lang="EN-GB"> </span><u></u><u></u></p>

<p class="MsoNormal"><span lang="EN-GB">Also is logback-decoder abandoned or just waiting for volunteers?</span><u></u><u></u></p><p class="MsoNormal"><span lang="EN-GB"> </span><u></u><u></u></p><p class="MsoNormal"><span lang="EN-GB">If its abandoned are there any alternatives?</span><u></u><u></u></p>

<p class="MsoNormal"><span lang="EN-GB"> </span><u></u><u></u></p><p class="MsoNormal"><span lang="EN-GB">Regards,</span><u></u><u></u></p><p class="MsoNormal"><span lang="EN-GB"> </span><u></u><u></u></p><p class="MsoNormal">

<span lang="EN-GB">Michael</span><u></u><u></u></p><p class="MsoNormal"><span lang="EN-GB"> </span><u></u><u></u></p><p class="MsoNormal"><span lang="EN-GB"> </span><u></u><u></u></p><p class="MsoNormal"><span lang="EN-GB"> </span><u></u><u></u></p>

<p class="MsoNormal"><span lang="EN-GB"> </span><u></u><u></u></p></div></div><p class="MsoNormal"><br>Visit our website at <a href="http://www.ubs.com" target="_blank">http://www.ubs.com</a><br><br>This message contains confidential information and is intended only<br>

for the individual named. If you are not the named addressee you<br>should not disseminate, distribute or copy this e-mail. Please<br>notify the sender immediately by e-mail if you have received this<br>e-mail by mistake and delete this e-mail from your system.<br>

<br>E-mails are not encrypted and cannot be guaranteed to be secure or<br>error-free as information could be intercepted, corrupted, lost,<br>destroyed, arrive late or incomplete, or contain viruses. The sender<br>therefore does not accept liability for any errors or omissions in the<br>

contents of this message which arise as a result of e-mail transmission.<br>If verification is required please request a hard-copy version. This<br>message is provided for informational purposes and should not be<br>construed as a solicitation or offer to buy or sell any securities<br>

or related financial instruments.<br><br>UBS Limited is authorised by the Prudential Regulation Authority<br>and regulated by the Financial Conduct Authority and the Prudential<br>Regulation Authority.<br><br>UBS AG is a public company incorporated with limited liability in<br>

Switzerland domiciled in the Canton of Basel-City and the Canton of<br>Zurich respectively registered at the Commercial Registry offices in<br>those Cantons with Identification No: CH-270.3.004.646-4 and having<br>respective head offices at Aeschenvorstadt 1, 4051 Basel and<br>

Bahnhofstrasse 45, 8001 Zurich, Switzerland and is authorised and<br>regulated by the Financial Market Supervisory Authority in<br>Switzerland.  Registered in the United Kingdom as a foreign company<br>with No: FC021146 and having a UK Establishment registered at<br>

Companies House, Cardiff, with No: BR 004507.  The principal office<br>of UK Establishment: 1 Finsbury Avenue, London EC2M 2PP.  In the<br>United Kingdom, UBS AG is authorised by the Prudential Regulation<br>Authority and subject to regulation by the Financial Conduct<br>

Authority and limited regulation by the Prudential Regulation<br>Authority.  Details about the extent of our regulation by the<br>Prudential Regulation Authority are available from us on request.<br><br>UBS reserves the right to retain all messages. Messages are protected<br>

and accessed only in legally justified cases. <br>_______________________________________________<br>logback-dev mailing list<br><a href="mailto:logback-dev@qos.ch" target="_blank">logback-dev@qos.ch</a><br><a href="http://mailman.qos.ch/mailman/listinfo/logback-dev" target="_blank">http://mailman.qos.ch/mailman/listinfo/logback-dev</a><u></u><u></u></p>

</div><p class="MsoNormal"><u></u> <u></u></p></div></div></div></div></div><br>Visit our website at <a href="http://www.ubs.com" target="_blank">http://www.ubs.com</a><br>
<br>
This message contains confidential information and is intended only<br>
for the individual named. If you are not the named addressee you<br>
should not disseminate, distribute or copy this e-mail. Please<br>
notify the sender immediately by e-mail if you have received this<br>
e-mail by mistake and delete this e-mail from your system.<br>
<br>
E-mails are not encrypted and cannot be guaranteed to be secure or<br>
error-free as information could be intercepted, corrupted, lost,<br>
destroyed, arrive late or incomplete, or contain viruses. The sender<br>
therefore does not accept liability for any errors or omissions in the<br>
contents of this message which arise as a result of e-mail transmission.<br>
If verification is required please request a hard-copy version. This<br>
message is provided for informational purposes and should not be<br>
construed as a solicitation or offer to buy or sell any securities<br>
or related financial instruments.<br>
<br>
UBS Limited is authorised by the Prudential Regulation Authority<br>
and regulated by the Financial Conduct Authority and the Prudential<br>
Regulation Authority.<br>
<br>
UBS AG is a public company incorporated with limited liability in<br>
Switzerland domiciled in the Canton of Basel-City and the Canton of<br>
Zurich respectively registered at the Commercial Registry offices in<br>
those Cantons with Identification No: CH-270.3.004.646-4 and having<br>
respective head offices at Aeschenvorstadt 1, 4051 Basel and<br>
Bahnhofstrasse 45, 8001 Zurich, Switzerland and is authorised and<br>
regulated by the Financial Market Supervisory Authority in<br>
Switzerland.  Registered in the United Kingdom as a foreign company<br>
with No: FC021146 and having a UK Establishment registered at<br>
Companies House, Cardiff, with No: BR 004507.  The principal office<br>
of UK Establishment: 1 Finsbury Avenue, London EC2M 2PP.  In the<br>
United Kingdom, UBS AG is authorised by the Prudential Regulation<br>
Authority and subject to regulation by the Financial Conduct<br>
Authority and limited regulation by the Prudential Regulation<br>
Authority.  Details about the extent of our regulation by the<br>
Prudential Regulation Authority are available from us on request.<br>
<br>
UBS reserves the right to retain all messages. Messages are protected<br>
and accessed only in legally justified cases. <br>_______________________________________________<br>
logback-dev mailing list<br>
<a href="mailto:logback-dev@qos.ch">logback-dev@qos.ch</a><br>
<a href="http://mailman.qos.ch/mailman/listinfo/logback-dev" target="_blank">http://mailman.qos.ch/mailman/listinfo/logback-dev</a><br></blockquote></div><br></div>