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:
  • Field Details

    • NA

      public static final String NA
      When location information is not available the constant NA is returned. Current value of this string constant is ?.
      See Also:
    • serialVersionUID

      static final long serialVersionUID
      See Also:
    • stackTraceElement

      private final StackTraceElement stackTraceElement
    • fullInfo

      public String fullInfo
  • Constructor Details

    • 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 name
      declaringClass - class name
      methodName - method
      line - source line number
      Since:
      1.2.15
    • LocationInfo

      public LocationInfo(Throwable throwable, String fqnOfCallingClass)
      Constructs a new instance.
  • Method Details

    • 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.