Package ch.qos.logback.classic.spi
Class CallerData
- java.lang.Object
-
- ch.qos.logback.classic.spi.CallerData
-
public class CallerData extends java.lang.Object
This class computes caller data returning the result in the form of a StackTraceElement array.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
CALLER_DATA_NA
static java.lang.StackTraceElement[]
EMPTY_CALLER_DATA_ARRAY
This value is returned in case no caller data could be extracted.static int
LINE_NA
When caller information is not available this constant is used for the line number.private static java.lang.String
LOG4J_CATEGORY
static java.lang.String
NA
When caller information is not available this constant is used for file name, method name, etc.private static java.lang.String
SLF4J_BOUNDARY
-
Constructor Summary
Constructors Constructor Description CallerData()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StackTraceElement[]
extract(java.lang.Throwable t, java.lang.String fqnOfInvokingClass, int maxDepth, java.util.List<java.lang.String> frameworkPackageList)
Extract caller data information as an array based on a Throwable passed as parameter(package private) static boolean
isInFrameworkSpace(java.lang.String currentClass, java.lang.String fqnOfInvokingClass, java.util.List<java.lang.String> frameworkPackageList)
private static boolean
isInFrameworkSpaceList(java.lang.String currentClass, java.util.List<java.lang.String> frameworkPackageList)
Is currentClass present in the list of packages considered part of the logging framework?static java.lang.StackTraceElement
naInstance()
-
-
-
Field Detail
-
NA
public static final java.lang.String NA
When caller information is not available this constant is used for file name, method name, etc.- See Also:
- Constant Field Values
-
LOG4J_CATEGORY
private static final java.lang.String LOG4J_CATEGORY
- See Also:
- Constant Field Values
-
SLF4J_BOUNDARY
private static final java.lang.String SLF4J_BOUNDARY
- See Also:
- Constant Field Values
-
LINE_NA
public static final int LINE_NA
When caller information is not available this constant is used for the line number.- See Also:
- Constant Field Values
-
CALLER_DATA_NA
public static final java.lang.String CALLER_DATA_NA
-
EMPTY_CALLER_DATA_ARRAY
public static final java.lang.StackTraceElement[] EMPTY_CALLER_DATA_ARRAY
This value is returned in case no caller data could be extracted.
-
-
Method Detail
-
extract
public static java.lang.StackTraceElement[] extract(java.lang.Throwable t, java.lang.String fqnOfInvokingClass, int maxDepth, java.util.List<java.lang.String> frameworkPackageList)
Extract caller data information as an array based on a Throwable passed as parameter
-
isInFrameworkSpace
static boolean isInFrameworkSpace(java.lang.String currentClass, java.lang.String fqnOfInvokingClass, java.util.List<java.lang.String> frameworkPackageList)
-
isInFrameworkSpaceList
private static boolean isInFrameworkSpaceList(java.lang.String currentClass, java.util.List<java.lang.String> frameworkPackageList)
Is currentClass present in the list of packages considered part of the logging framework?
-
-