public class LocationInfo extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
String |
fullInfo |
static String |
NA
When location information is not available the constant
NA is returned. |
Constructor and 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.
|
Modifier and Type | Method and 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.
|
public static final String NA
NA
is returned. Current value of this string
constant is ?.public LocationInfo(StackTraceElement stackTraceElement)
public LocationInfo(String file, String declaringClass, String methodName, String line)
file
- source file namedeclaringClass
- class namemethodName
- methodline
- source line numberpublic LocationInfo(Throwable throwable, String fqnOfCallingClass)
public String getClassName()
public String getFileName()
public String getLineNumber()
public String getMethodName()
Copyright © 1999-2022 The Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.