Details
-
Improvement
-
Resolution: Unresolved
-
Major
-
1.1.3
Description
The following converter (pattern) use CallerData to get the first stack trace element.
- ClassOfCallerConverter
- MethodOfCallerConverter
- LineOfCallerConverter
- FileOfCallerConverter
If I want to extend the SubstituteLogger to add utility methods then the first element of the stack will always be SubstituteLogger.
I think Logback should ignore SubstituteLogger from the stack trace element and take the next element.
<code>
for (StackTraceElement stackTraceElement : callerData) {
if (SubstituteLogger.class.getName().equals(stackTraceElement.getClassName()))
return stackTraceElement;
}
</code>
I know that I can create a custom layout or extend PatternLayout to replace the converter but I think Logback should do that by default.
Attachments
Issue Links
- relates to (out)
-
SLF4J-445 Skip SubstituteLogger from caller data (slf4j-jdk14)
- Resolved