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
ConstructorsConstructorDescriptionConstructs aStackHasherusingStackElementFilter.withSourceInfo()filterStackHasher(StackElementFilter filter) Constructs aStackHasherwith the given filter. -
Method Summary
-
Constructor Details
-
StackHasher
Constructs aStackHasherwith the given filter.- Parameters:
filter- filter
-
StackHasher
public StackHasher()Constructs aStackHasherusingStackElementFilter.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
causehash, and so on...- Parameters:
error- the error to generate a hash from- Returns:
- a Dequeue with hashes
-