Class SourceLocation (3.20.2)

public final class SourceLocation implements Serializable

Additional information about the source code location that produced the log entry.

Inheritance

Object > SourceLocation

Implements

Serializable

Static Methods

newBuilder()

public static SourceLocation.Builder newBuilder()
Returns
Type Description
SourceLocation.Builder

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getFile()

public String getFile()

Returns the source file name. Depending on the runtime environment, this might be a simple name or a fully-qualified name.

Returns
Type Description
String

getFunction()

public String getFunction()

Returns the human-readable name of the function or method being invoked, with optional context such as the class or package name. This information may be used in contexts such as the logs viewer, where a file and line number are less meaningful. The format can vary by language.

Returns
Type Description
String

getLine()

public Long getLine()

Returns the line within the source file. 1-based; 0 indicates no line number available.

Returns
Type Description
Long

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

toBuilder()

public SourceLocation.Builder toBuilder()
Returns
Type Description
SourceLocation.Builder

toString()

public String toString()
Returns
Type Description
String
Overrides