logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ralph Goers (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LOG4J2-155) add getFormat to Layout
Date Sun, 03 Mar 2013 08:29:13 GMT

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

Ralph Goers commented on LOG4J2-155:
------------------------------------

The "type" is used to determine the plugins that will be returned by the PluginManager for
different purposes. There are 4 types.
1. "Core" - These are captured in BaseConfiguration and would be in the base configuration
object.
2. "ConfigurationManager" - Identifies the different types of configuration factories.
3. "Lookup" - Identifies the Lookups available to the Interpolator.
4. "Converter" - Used by PatternLayout to determine the available pattern converters.
It is most likely that the plugin type for what you are doing would be "Core".

The element type is important when using "strict". In "normal" mode the XML element name is
the name of the Plugin. In "strict" mode the XML element name is the value of "elementType"
and the value of the "type" attribute is the elementType.
                
> add getFormat to Layout
> -----------------------
>
>                 Key: LOG4J2-155
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-155
>             Project: Log4j 2
>          Issue Type: Improvement
>            Reporter: Scott Deboy
>         Attachments: log4j2-155-feb21-rev1.patch, log4j2-155-feb24-rev1.patch, log4j2-155-jan22-rev1.patch,
log4j2-155-jan23-rev1.patch
>
>
> I was looking at an old rev - getContentType is now exposed - thanks!
> Now if we could add a 'getFormat':
> It would be useful to expose information about a Layout's format.
> If the content type is text/plain, exposing the layout format as a conversion pattern
would work fine.
> If the content type is text/html or text/xml we could expose something else (or null).
> My primary interest is adding the ability to 'discover' the file-based logging configurations
in order to support them via Chainsaw and multicast DNS.
> If all Layouts supporting text/plain content types exposed their format as a conversion
pattern, and the file-based appenders (optionally) provided the ability to advertise their
configuration, the files could be remotely tailed without the far endpoint even knowing anything
about the file configuration.
> For an example, see how multicast appenders are exposed via zeroconf/multicast dns in
log4j 1.x in activateOptions - something very similar could be done with contenttype and format
properties in a fileappender with a layout.
>     if (advertiseViaMulticastDNS) {
>         Map properties = new HashMap();
>         properties.put("multicastAddress", remoteHost);
>         zeroConf = new ZeroConfSupport(ZONE, port, getName(), properties);
>         zeroConf.advertise();
>     }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
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


Mime
View raw message