You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Horacio Mijail Anton Quiles (Jira)" <ji...@apache.org> on 2020/04/26 23:32:00 UTC

[jira] [Comment Edited] (LOG4J2-2831) Documentation doesn't list all the Appenders that can do runtime lookup

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

Horacio Mijail Anton Quiles edited comment on LOG4J2-2831 at 4/26/20, 11:31 PM:
--------------------------------------------------------------------------------

It's first for the Routing Appender, but it's more general: am I missing this functionality in other Appenders because the documentation omitted it?

For example, the page never says the File Appender supports runtime substitution, and yet I found an old example in Stack Overflow where someone assumed offhand that such substitution would work. I tried that example, but it doesn't work for me. So: was he wrong or is my implementation faulty because of my (mis?)use of the $ syntax? The documentation should probably be the definitive answer, but it isn't helping: if we assume that the FIleAppender doesn't support it because it doesn't mention it, then RoutingAppender wouldn't support it either.

 

Regarding that quote, note that it doesn't say anything about this happening at runtime. 
 For contrast, RollingAppender and RollingRandomAccessFileAppender do call it out explicitly.


was (Author: hmijail):
It's first for the Routing Appender, but it's more general: am I missing this functionality in other Appenders because the documentation omitted it?

For example, the page never says the File Appender supports runtime substitution, and yet I found an old example in Stack Overflow where someone assumed offhand that such substitution would work. I tried that example, but it doesn't work for me. So: was he wrong or is my implementation faulty because of my (mis?)use of the $ syntax? The documentation should probably be the definitive answer, but it isn't helping.

 

Regarding that quote, note that it doesn't say anything about this happening at runtime. 
For contrast, RollingAppender and RollingRandomAccessFileAppender do call it out explicitly.

> Documentation doesn't list all the Appenders that can do runtime lookup
> -----------------------------------------------------------------------
>
>                 Key: LOG4J2-2831
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-2831
>             Project: Log4j 2
>          Issue Type: Improvement
>          Components: Documentation
>            Reporter: Horacio Mijail Anton Quiles
>            Priority: Major
>
> The Appenders documentation page doesn't seem to mention all the cases in which lookups/property substitution are applied at runtime.
> For example, the Routing Appender evidently does runtime substitution, as mentioned in [https://logging.apache.org/log4j/2.x/manual/configuration.html#PropertySubstitution] . This page also says "Not all elements support resolving variables at runtime. Components that do will specifically call that out in their documentation. "
> However this is not called out in [https://logging.apache.org/log4j/2.x/manual/appenders.html#RoutingAppender]
> If "their documentation" means some other page, it'd be good to link to it.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)