Package org.apache.log4j.spi
Class LocationInfo
java.lang.Object
org.apache.log4j.spi.LocationInfo
- All Implemented Interfaces:
Serializable
The internal representation of caller location information.
- Since:
- 0.8.3
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
When location information is not available the constantNA
is returned.(package private) static final long
private final StackTraceElement
-
Constructor Summary
ConstructorsConstructorDescriptionLocationInfo
(StackTraceElement stackTraceElement) Constructs a new instance.LocationInfo
(String file, String declaringClass, String methodName, String line) Constructs a new instance.LocationInfo
(Throwable throwable, String fqnOfCallingClass) Constructs a new instance. -
Method Summary
Modifier and TypeMethodDescriptionGets the fully qualified class name of the caller making the logging request.Gets the file name of the caller.Gets the line number of the caller.Gets the method name of the caller.
-
Field Details
-
NA
When location information is not available the constantNA
is returned. Current value of this string constant is ?.- See Also:
-
serialVersionUID
static final long serialVersionUID- See Also:
-
stackTraceElement
-
fullInfo
-
-
Constructor Details
-
LocationInfo
Constructs a new instance. -
LocationInfo
Constructs a new instance.- Parameters:
file
- source file namedeclaringClass
- class namemethodName
- methodline
- source line number- Since:
- 1.2.15
-
LocationInfo
Constructs a new instance.
-
-
Method Details
-
getClassName
Gets the fully qualified class name of the caller making the logging request. -
getFileName
Gets the file name of the caller. -
getLineNumber
Gets the line number of the caller. -
getMethodName
Gets the method name of the caller.
-