-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deterministic UUID option for PatternLayout #3532
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general this looks fine to me, thanks!
A couple of notes:
log4j-core/src/main/java/org/apache/logging/log4j/core/util/UuidUtil.java
Outdated
Show resolved
Hide resolved
log4j-core/src/main/java/org/apache/logging/log4j/core/util/UuidUtil.java
Outdated
Show resolved
Hide resolved
log4j-core/src/main/java/org/apache/logging/log4j/core/util/UuidUtil.java
Outdated
Show resolved
Hide resolved
Thanks for your feedback, @ppkarwasz. I was originally using a SecureRandom to comply with the UUID guidelines for using crypto-secure RNG, but I've experimented and decided to switch to a straightforward murmurhash of the LogEvent fields instead. It's also formatted as a UUID v8 now. |
Draft implementation of a deterministic UUID generator based on a LogEvent hash. Would enable Appenders to produce repeatable UUIDs for the same LogEvent and correlate log outputs.
Discussion