Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-3919

RequestLogger generates log entries that are not parsable

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.5-RC5.1
    • 1.5-RC6
    • wicket
    • None

    Description

      The current (default) request logger generates logs that are not parsable by automated tools. The identifiers and values give many collisions with keywords, making it impossible to create an efficient ANTLR parser/lexer for it.

      A couple of observations:

      • the log is not parsable due to inconsistent logging of log parts. For example [ResourceStreamRequestTarget[[]] generates an unbalanced number of brackets
      • some parts are joined by ',' and others are joined by ', ' (notice the extra whitespace)
      • it is not possible to retrieve parts of the logs because keywords, identifiers and values share the same namespace. A page parameter with name 'event' would choke a LL parser since the lexer will render a keyword instead of a value

      Possible solutions:

      • fix the current format to become consistent and parsable, by surrounding identifiers and values with single quotes and escaping single quotes inside the identifiers and values, and fixing other issues
      • render JSON instead of the current format (in my opinion best done in a separate JSonRequestLogger)
      • ???

      Attachments

        1. JsonAndImprovedRequestLogger.txt
          52 kB
          Martijn Dashorst
        2. JsonRequestLogger.java
          11 kB
          Martin Tzvetanov Grigorov
        3. RequestLoggerTest.java
          3 kB
          Andrea Del Bene

        Activity

          People

            mgrigorov Martin Tzvetanov Grigorov
            dashorst Martijn Dashorst
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: