You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Gary Gregory (JIRA)" <ji...@apache.org> on 2018/01/25 22:22:00 UTC

[jira] [Resolved] (LOG4J2-2195) Cannot define both `filters` and `separator` for PatternLayout %xEx

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

Gary Gregory resolved LOG4J2-2195.
----------------------------------
       Resolution: Fixed
    Fix Version/s: 2.11.0

I have a fix in git master. Please try a {{2.10.1-SNAPSHOT}} build from our snapshot repository https://repository.apache.org/content/repositories/snapshots/. Also note that the syntax for the pattern must be:
{noformat}
<PatternLayout pattern="%d{DEFAULT} - %msg - %xEx{full}{filters(org.junit,org.eclipse)}{separator(|)}%n" />
{noformat}

If that works for you, please close this ticket.

> Cannot define both `filters` and `separator` for PatternLayout %xEx
> -------------------------------------------------------------------
>
>                 Key: LOG4J2-2195
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-2195
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Pattern Converters
>    Affects Versions: 2.10.0
>            Reporter: Raman Gupta
>            Assignee: Gary Gregory
>            Priority: Minor
>             Fix For: 2.11.0
>
>
> Defining a pattern layout that contains:
> {{%xEx\{full,filters(${exceptionFilters}),separator(|)}}}
> does not work – the filters are applied but the separator is not.
> Only if the filters are removed does the separator apply to the layout.
> Reproduction recipe, including config file and test program here: https://gist.github.com/rocketraman/9a92ce76ee79bf6a15ab9b3a5ec95e08
> Above you can see that the exception separator was not applied -- the default newlines are present in the output instead.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)