[logback-dev] logback-decoder

Tony Trinh tony19 at gmail.com
Thu Jun 13 17:36:30 CEST 2013


Thanks for the test case. That's helpful.

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.

Tony


On Wed, Jun 12, 2013 at 11:30 AM, <michael.cox at ubs.com> wrote:

> I so I picked up your latest****
>
> ** **
>
> Does not work for me****
>
> ** **
>
> Test case:****
>
> ** **
>
> 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****
>
> ** **
>
> Pattern:****
>
> ** **
>
> %d{yyyy-MM-dd HH:mm:ss.SSS,UTC} %-5level [%thread] %logger{0}: %msg%n****
>
> ** **
>
> Logger name now seems to consume the message up to the 2nd colon. One
> would have hoped it would stop at the first colon.****
>
> ** **
>
> Michael****
>
> ** **
>
> Note I added the two simple parsers like MessageParser to capture logger
> and thread into the Log event****
>
> ** **
>
> *From:* logback-dev [mailto:logback-dev-bounces at qos.ch] *On Behalf Of *Tony
> Trinh
> *Sent:* 10 June 2013 04:56
> *To:* logback developers list
> *Subject:* Re: [logback-dev] logback-decoder****
>
> ** **
>
> Hi Michael,****
>
> ** **
>
> logback-decoder is definitely open to volunteers :)  not abandoned.****
>
> ** **
>
> I've fixed the bug you've discovered [1]. Let me know if that works for
> you.****
>
> ** **
>
> Thanks,****
>
> Tony****
>
> ** **
>
> [1] https://github.com/qos-ch/logback-decoder/issues/1****
>
> ** **
>
> On Fri, Jun 7, 2013 at 2:51 AM, <michael.cox at ubs.com> wrote:****
>
> Hi,****
>
>  ****
>
> I'm trying to use this component – aware that it is in early dev stages
> but with the intention of contributing back fixes.****
>
>  ****
>
> For example I have made some changes to allow handling of date patterns
> with a timezone e..g****
>
>  ****
>
> %d{yyyy-MM-dd HH:mm:ss.SSS,UTC}****
>
>  ****
>
> I have also added parsers for %thread and %logger.****
>
>  ****
>
> I'm coming unstuck with a few types of pattern e.g.****
>
>  ****
>
> %d{yyyy-MM-dd HH:mm:ss.SSS  %-5logger %msg****
>
>  ****
>
> Will parse ****
>
>  ****
>
> "2013-06-07 10:00:00.999 ERROR rest of my log message"****
>
>  ****
>
> But will fail to parse  ****
>
>  ****
>
> "2013-06-07 10:00:00.999 INFO  rest of my log message"****
>
>  ****
>
> (reducing the two spaces after INFO to one makes it parseable)****
>
>  ****
>
> And also anything like %logger{0} 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{….}:****
>
>  ****
>
> 08:46:01.510 [main] DEBUG ch.qos.logback.decoder.Decoder - date =
> 2013-06-07 05:03:28.853****
>
> 08:46:01.514 [main] ERROR ch.qos.logback.decoder.DateParser -
> java.lang.IllegalArgumentException: Illegal pattern character 'U'****
>
> 08:46:01.514 [main] DEBUG ch.qos.logback.decoder.Decoder - level = INFO***
> *
>
> 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)****
>
> 08:46:01.515 [main] DEBUG ch.qos.logback.decoder.Decoder - thread = main**
> **
>
> 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)****
>
> 08:46:01.516 [main] DEBUG ch.qos.logback.decoder.Decoder - logger =
> KdbFxFeedhandlerApp****
>
>  ****
>
> java.lang.IndexOutOfBoundsException: Index: 3, Size: 3****
>
>      at java.util.LinkedList.checkElementIndex(LinkedList.java:553)****
>
>      at java.util.LinkedList.get(LinkedList.java:474)****
>
>      :****
>
>  ****
>
> Remove the {0} from the end of logger and it all works.****
>
>  ****
>
> Can anyone advise on how these last two could be fixed?****
>
>  ****
>
> Also is logback-decoder abandoned or just waiting for volunteers?****
>
>  ****
>
> If its abandoned are there any alternatives?****
>
>  ****
>
> Regards,****
>
>  ****
>
> Michael****
>
>  ****
>
>  ****
>
>  ****
>
>  ****
>
>
> Visit our website at http://www.ubs.com
>
> This message contains confidential information and is intended only
> for the individual named. If you are not the named addressee you
> should not disseminate, distribute or copy this e-mail. Please
> notify the sender immediately by e-mail if you have received this
> e-mail by mistake and delete this e-mail from your system.
>
> E-mails are not encrypted and cannot be guaranteed to be secure or
> error-free as information could be intercepted, corrupted, lost,
> destroyed, arrive late or incomplete, or contain viruses. The sender
> therefore does not accept liability for any errors or omissions in the
> contents of this message which arise as a result of e-mail transmission.
> If verification is required please request a hard-copy version. This
> message is provided for informational purposes and should not be
> construed as a solicitation or offer to buy or sell any securities
> or related financial instruments.
>
> UBS Limited is authorised by the Prudential Regulation Authority
> and regulated by the Financial Conduct Authority and the Prudential
> Regulation Authority.
>
> UBS AG is a public company incorporated with limited liability in
> Switzerland domiciled in the Canton of Basel-City and the Canton of
> Zurich respectively registered at the Commercial Registry offices in
> those Cantons with Identification No: CH-270.3.004.646-4 and having
> respective head offices at Aeschenvorstadt 1, 4051 Basel and
> Bahnhofstrasse 45, 8001 Zurich, Switzerland and is authorised and
> regulated by the Financial Market Supervisory Authority in
> Switzerland.  Registered in the United Kingdom as a foreign company
> with No: FC021146 and having a UK Establishment registered at
> Companies House, Cardiff, with No: BR 004507.  The principal office
> of UK Establishment: 1 Finsbury Avenue, London EC2M 2PP.  In the
> United Kingdom, UBS AG is authorised by the Prudential Regulation
> Authority and subject to regulation by the Financial Conduct
> Authority and limited regulation by the Prudential Regulation
> Authority.  Details about the extent of our regulation by the
> Prudential Regulation Authority are available from us on request.
>
> UBS reserves the right to retain all messages. Messages are protected
> and accessed only in legally justified cases.
> _______________________________________________
> logback-dev mailing list
> logback-dev at qos.ch
> http://mailman.qos.ch/mailman/listinfo/logback-dev****
>
> ** **
>
> Visit our website at http://www.ubs.com
>
> This message contains confidential information and is intended only
> for the individual named. If you are not the named addressee you
> should not disseminate, distribute or copy this e-mail. Please
> notify the sender immediately by e-mail if you have received this
> e-mail by mistake and delete this e-mail from your system.
>
> E-mails are not encrypted and cannot be guaranteed to be secure or
> error-free as information could be intercepted, corrupted, lost,
> destroyed, arrive late or incomplete, or contain viruses. The sender
> therefore does not accept liability for any errors or omissions in the
> contents of this message which arise as a result of e-mail transmission.
> If verification is required please request a hard-copy version. This
> message is provided for informational purposes and should not be
> construed as a solicitation or offer to buy or sell any securities
> or related financial instruments.
>
> UBS Limited is authorised by the Prudential Regulation Authority
> and regulated by the Financial Conduct Authority and the Prudential
> Regulation Authority.
>
> UBS AG is a public company incorporated with limited liability in
> Switzerland domiciled in the Canton of Basel-City and the Canton of
> Zurich respectively registered at the Commercial Registry offices in
> those Cantons with Identification No: CH-270.3.004.646-4 and having
> respective head offices at Aeschenvorstadt 1, 4051 Basel and
> Bahnhofstrasse 45, 8001 Zurich, Switzerland and is authorised and
> regulated by the Financial Market Supervisory Authority in
> Switzerland.  Registered in the United Kingdom as a foreign company
> with No: FC021146 and having a UK Establishment registered at
> Companies House, Cardiff, with No: BR 004507.  The principal office
> of UK Establishment: 1 Finsbury Avenue, London EC2M 2PP.  In the
> United Kingdom, UBS AG is authorised by the Prudential Regulation
> Authority and subject to regulation by the Financial Conduct
> Authority and limited regulation by the Prudential Regulation
> Authority.  Details about the extent of our regulation by the
> Prudential Regulation Authority are available from us on request.
>
> UBS reserves the right to retain all messages. Messages are protected
> and accessed only in legally justified cases.
> _______________________________________________
> logback-dev mailing list
> logback-dev at qos.ch
> http://mailman.qos.ch/mailman/listinfo/logback-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/logback-dev/attachments/20130613/318115e2/attachment-0001.html>


More information about the logback-dev mailing list