Package net.logstash.logback.stacktrace
Class StackHasher
java.lang.Object
net.logstash.logback.stacktrace.StackHasher
Utility class that generates a hash from any Java
error
- Author:
- Pierre Smeyers
-
Constructor Summary
ConstructorDescriptionConstructs aStackHasher
usingStackElementFilter.withSourceInfo()
filterStackHasher
(StackElementFilter filter) Constructs aStackHasher
with the given filter. -
Method Summary
-
Constructor Details
-
StackHasher
Constructs aStackHasher
with the given filter.- Parameters:
filter
- filter
-
StackHasher
public StackHasher()Constructs aStackHasher
usingStackElementFilter.withSourceInfo()
filter
-
-
Method Details
-
hexHash
Generates a Hexadecimal hash for the given error stack.Two errors with the same stack hash are most probably same errors.
- Parameters:
error
- the error to generate a hash from- Returns:
- the generated hexadecimal hash
-
hexHashes
Generates and returns Hexadecimal hashes for the error stack and each ancestorcause
.The first queue element is the stack hash for the topmost error, the next one (if any) is it's direct
cause
hash, and so on...- Parameters:
error
- the error to generate a hash from- Returns:
- a Dequeue with hashes
-