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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to