[logback-dev] [JIRA] Commented: (LBCLASSIC-22) feature request: XMLLayout (cfr. log4j)

Ceki Gulcu (JIRA) noreply-jira at qos.ch
Mon Feb 16 16:23:47 CET 2009


    [ http://jira.qos.ch/browse/LBCLASSIC-22?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=11046#action_11046 ] 

Ceki Gulcu commented on LBCLASSIC-22:
-------------------------------------

> 1) "generates humanly readable output" - the output is in a form that is readable to the human eye when browsing 
> the text file containing the output from the XMLLayout. This _INCLUDES_ the time attribute which contains a 
> humanly readable version of the timestamp, put in a location where it is useful in the situation where the human 
> needs to read the logfile. I took great care in putting the linefeeds in the right places while maintaining DTD
> conformancy.

The output generated by XMLLayout_Blue (blue for the version currently shipping in logback 0.9.16) also generates "humanly readable" output. The timestamp attribute is *not* part of log4j.dtd, at least not on any currently shipping version of log4j. I am not sure one can just add unexpected attributes to a given element and still be DTD compliant. How about adding a comment which includes the date? A comment will satisfy the human reader without affecting DTD compliance.

> 2) Uses numeric XML entities instead of CDATA. In my experience this is more robust to data transports where the
> encoding is broken - which we have more often than I like to think about here - as it keeps to 7-bit ascii, AND it is 
> better to the human reader as "<", ">" and "&" are only found in their proper form in tagnames and entities and not as 
> a CDATA stream. Also linefeeds etc are encoded as their numeric XML entity, resultning in each log event 
> generating exactly two lines of output (but can be very wide). 

We could add a 7-bit transport property (a boolean) to XMLLayout_Blue and if 7-bit transport property were set, your style of encoding would be used.

> feature request: XMLLayout (cfr. log4j)
> ---------------------------------------
>
>                 Key: LBCLASSIC-22
>                 URL: http://jira.qos.ch/browse/LBCLASSIC-22
>             Project: logback-classic
>          Issue Type: Improvement
>          Components: Other
>    Affects Versions: unspecified
>         Environment: Operating System: Linux
> Platform: PC
>            Reporter: dirk
>            Assignee: Ceki Gulcu
>            Priority: Minor
>             Fix For: 0.9.15
>
>         Attachments: XMLLayout.jar, XMLLayout.java
>
>
> see Summary

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the logback-dev mailing list