You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by "Ralph Goers (JIRA)" <ji...@apache.org> on 2012/05/01 06:22:45 UTC

[jira] [Closed] (LOG4J2-19) Provide looser coupling of PatternConverters

     [ https://issues.apache.org/jira/browse/LOG4J2-19?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ralph Goers closed LOG4J2-19.
-----------------------------

       Resolution: Fixed
    Fix Version/s: 2.0-alpha1
         Assignee: Ralph Goers

Log4j 2's plugin mechanism solves this.
                
> Provide looser coupling of PatternConverters
> --------------------------------------------
>
>                 Key: LOG4J2-19
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-19
>             Project: Log4j 2
>          Issue Type: Improvement
>          Components: Layouts
>            Reporter: Ralph Goers
>            Assignee: Ralph Goers
>             Fix For: 2.0-alpha1
>
>
> Currently, PatternLayout calls PatternParser which knows about the various PatternConverters, many of which are imbedded in it. This makes it difficult for users to add their own Converters. 
> In the logging framework I created each converter identified the conversion characters it supported. Each PatternConverter was required to supply a getKeys() method that returned this list. The equivalent of the PatternLayout contained an array of PatternConverters. During initialization each of these would be called and the list of keys recorded along with the associated converter. To add your own converter all that was necessary was to extend the class and add your new keys to the list of recorded keys along with their converters. The base PatternLayout would then take care of calling the correct converters as necessary.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org