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 "Robert Schaft (JIRA)" <ji...@apache.org> on 2015/04/29 18:25:06 UTC

[jira] [Created] (LOG4J2-1001) ExtendedThrowablePatternConverter ignores depth and short options in windows.

Robert Schaft created LOG4J2-1001:
-------------------------------------

             Summary: ExtendedThrowablePatternConverter ignores depth and short options in windows.
                 Key: LOG4J2-1001
                 URL: https://issues.apache.org/jira/browse/LOG4J2-1001
             Project: Log4j 2
          Issue Type: Bug
          Components: Pattern Converters
    Affects Versions: 2.2
         Environment: Windows, eclipse
            Reporter: Robert Schaft


The Pattern %xException{short} or %xException{1} make always a full listing.
I tracked the problem down to {{ExtendedThrowablePatternConverter:79}}:
{quote}
{{final String[] array = trace.split(Constants.LINE_SEPARATOR);}}
{quote}
{{Constants.LINE_SEPARATOR}} is on my system "\r\n" while the {trace} contains only "\n". The {{trace.split}} creates therefore an array of _1_ String.
This first string (containing the whole stacktrace) is then appended when the first array element is appended.
I feel that the code requires some refactoring because the source of the problem is {{ThrowableProxy.getExtendedStackTraceAsString}} not returning an array of lines but a String where the lines are separated by a magic {{private}} character {{ThrowableProxy.EOL}}.




--
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