Package org.apache.log4j.spi
Class LocationInfo
- java.lang.Object
-
- org.apache.log4j.spi.LocationInfo
-
- All Implemented Interfaces:
Serializable
public class LocationInfo extends Object implements Serializable
The internal representation of caller location information.- Since:
- 0.8.3
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description LocationInfo(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getClassName()
Gets the fully qualified class name of the caller making the logging request.String
getFileName()
Gets the file name of the caller.String
getLineNumber()
Gets the line number of the caller.String
getMethodName()
Gets the method name of the caller.
-
-
-
Field Detail
-
NA
public static final String NA
When location information is not available the constantNA
is returned. Current value of this string constant is ?.- See Also:
- Constant Field Values
-
fullInfo
public String fullInfo
-
-
Constructor Detail
-
LocationInfo
public LocationInfo(StackTraceElement stackTraceElement)
Constructs a new instance.
-
LocationInfo
public LocationInfo(String file, String declaringClass, String methodName, String line)
Constructs a new instance.- Parameters:
file
- source file namedeclaringClass
- class namemethodName
- methodline
- source line number- Since:
- 1.2.15
-
-
Method Detail
-
getClassName
public String getClassName()
Gets the fully qualified class name of the caller making the logging request.
-
getFileName
public String getFileName()
Gets the file name of the caller.
-
getLineNumber
public String getLineNumber()
Gets the line number of the caller.
-
getMethodName
public String getMethodName()
Gets the method name of the caller.
-
-