[ 
https://issues.apache.org/jira/browse/WICKET-3919?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13072299#comment-13072299
 ] 

Martin Grigorov commented on WICKET-3919:
-----------------------------------------

wicket-core tests use slf4j-log4j12 so you can rely on log4j for this test.
It will be tricky to include a second slfj4 impl. slf4j binds very early 
against the impl and even shows errors in the logs if you have more than one 
impl in the classpath.

But Emond's idea is to save the data in a POJO and then different 
IRequestLogger impls will pass that data to different serializers (JSON, XML, 
...), and then the produced output will be either passed to slf4j or saved in a 
separate file (why not one per session?!). So testing the serialization is 
enough, no need to test saving in files, writing to stdout or anything like 
that. 

> RequestLogger generates log entries that are not parsable
> ---------------------------------------------------------
>
>                 Key: WICKET-3919
>                 URL: https://issues.apache.org/jira/browse/WICKET-3919
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-core
>    Affects Versions: 1.5-RC5.1
>            Reporter: Martijn Dashorst
>         Attachments: JsonAndImprovedRequestLogger.txt, RequestLoggerTest.java
>
>
> 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(x) 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)
>  - ???

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to