-
Type:
Bug
-
Resolution: Low Engagement
-
Priority:
Low
-
None
-
Affects Version/s: 8.0.0, 8.4.2
-
Component/s: Environment - Java
-
8
-
2
-
Severity 3 - Minor
-
0
Issue Summary
Atlassian Logging 2.x is shipped with Jira 8.5 EAP. The class NewLineIndentingFilteringPatternLayout code eats up a stacktrace because of a simple count error.
It is very confusing when the error logs are missing the most crucial information without any indication. It cost us quite some time...
Environment
Steps to Reproduce
In a particular stack trace, we notice that there is no call to Preconditions.checkArgument inside DelegatingEntityPropertyService.setProperty().
I think the stacktrace is missing one frame (for whatever reason).
Expected Results
The entire stack trace is printed.
Actual Results
A line is missing from the stack trace thrown.
Notes
I investigated some more into the issues with the missing stackframe in the log.
This issue seems to have been fixed somewhere in a 3.X release of the Atlassian Logging library which Jira also uses.
Jira 8.5 (tested with 8.5.0-EAP02) will only ship a version 2.X of Atlassian Logging that contains this bug.
This is the fix, for completeness sake:
public class StackTraceCompressor {
@@ -168,7 +160,7 @@
{
// after a cause by line we reset and show the next min lines and then start filtering all over again
appendSkipIndicators(buffer, filteredCount, eludedLineSummary);
- lineCount = outputMinimumLines(buffer, stackTraceLines, lineCount, getMinimumLines());
+ lineCount = outputMinimumLines(buffer, stackTraceLines, lineCount, getMinimumLines()) - 1;
ignoreLinesUntilEnd = false;
continue;
}
Workaround
We have another log appender that save the same log and there the frame is indeed present.