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 "Gökalp Kuşçu (JIRA)" <ji...@apache.org> on 2015/04/30 00:24:06 UTC
[jira] [Commented] (LOG4J2-1001) ExtendedThrowablePatternConverter
ignores depth and short options in windows.
[ https://issues.apache.org/jira/browse/LOG4J2-1001?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14520412#comment-14520412 ]
Gökalp Kuşçu commented on LOG4J2-1001:
--------------------------------------
like dublicate for https://issues.apache.org/jira/browse/LOG4J2-925
I think, all methods which returns stacktrace, suppress with println stream. Constants.LINE_SEPARATOR is not trusty.
> 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
> Original Estimate: 48h
> Remaining Estimate: 48h
>
> 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