You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Robert Ross (JIRA)" <ji...@apache.org> on 2018/04/24 23:24:00 UTC

[jira] [Updated] (LOG4J2-2324) PatternLayout handling of Throwable alternate separator doesn't accept special characters?

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

Robert Ross updated LOG4J2-2324:
--------------------------------
    Description: 
When attempting to use an alternate line separator for Throwable stack lines, it seems impossible to use special characters like {{\t \r \n}} or anything else.  It also seems impossible to use variable references so one cannot use ${sys:line.separator} as well as other characters.

In the case of simple uses of {{\t \r \n}} or anything else are converted to plain text, actually resulting in "\t" in the output.
{code:xml}
%-5level - %d{yyyy.MM.dd hh:mm:ss zzz} [%t @ %logger{1}] - %msg%n%ex{separator(\r\n\t)}%n
{code}
 If there's a way to do this, it isn't clear in the documentation.

  was:
When attempting to use an alternate line separator for Throwable stack lines, it seems impossible to use special characters like {{\t \r \n}} or anything else.  It also seems impossible to use variable references. Uses of {{\t \r \n}} or anything else are converted to plain text, actually resulting in "\t" in the output.
{code:xml}
%-5level - %d{yyyy.MM.dd hh:mm:ss zzz} [%t @ %logger{1}] - %msg%n%ex{separator(\r\n\t)}%n
{code}
 If there's a way to do this, it isn't clear in the documentation.


> PatternLayout handling of Throwable alternate separator doesn't accept special characters?
> ------------------------------------------------------------------------------------------
>
>                 Key: LOG4J2-2324
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-2324
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Layouts
>    Affects Versions: 2.11.0
>            Reporter: Robert Ross
>            Priority: Major
>              Labels: pattern, separator, throwable
>
> When attempting to use an alternate line separator for Throwable stack lines, it seems impossible to use special characters like {{\t \r \n}} or anything else.  It also seems impossible to use variable references so one cannot use ${sys:line.separator} as well as other characters.
> In the case of simple uses of {{\t \r \n}} or anything else are converted to plain text, actually resulting in "\t" in the output.
> {code:xml}
> %-5level - %d{yyyy.MM.dd hh:mm:ss zzz} [%t @ %logger{1}] - %msg%n%ex{separator(\r\n\t)}%n
> {code}
>  If there's a way to do this, it isn't clear in the documentation.



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