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 "Matt Sicker (JIRA)" <ji...@apache.org> on 2016/03/09 18:29:40 UTC

[jira] [Comment Edited] (LOG4J2-1169) PatternLayout: Possible variable substitution in equals substitution parameter

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

Matt Sicker edited comment on LOG4J2-1169 at 3/9/16 5:29 PM:
-------------------------------------------------------------

I don't think the Configuration needs to be looked up from a LoggerContext. The factory for this class already gets a Configuration which looks to be the same one that is looked up again in {{parseSubstitution(LogEvent)}}.

Edit: or the PatternParser created in the factory could be re-used which is even easier.


was (Author: jvz):
I don't think the Configuration needs to be looked up from a LoggerContext. The factory for this class already gets a Configuration which looks to be the same one that is looked up again in {{parseSubstitution(LogEvent)}}.

> PatternLayout: Possible variable substitution in equals substitution parameter
> ------------------------------------------------------------------------------
>
>                 Key: LOG4J2-1169
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-1169
>             Project: Log4j 2
>          Issue Type: Improvement
>          Components: Pattern Converters
>    Affects Versions: 2.4.1
>            Reporter: Gerald Kritzinger
>            Priority: Critical
>         Attachments: LOG4J2-1169.patch
>
>
> Let the substitution parameter of the equals function also substitute variables.
> E.g.: 
> {noformat}
> %equals{%marker}{}{%msg} 
> {noformat}
> should print the message if the marker is empty, currently "%msg" is appended.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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