Skip to content

Commit afcecf2

Browse files
committed
Update docs
1 parent 8a01c7b commit afcecf2

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/site/antora/modules/ROOT/pages/manual/pattern-layout.adoc

+8-4
Original file line numberDiff line numberDiff line change
@@ -1298,20 +1298,24 @@ threadPriority
12981298
[#converter-uuid]
12991299
==== UUID
13001300
1301-
Includes either a random or a time-based UUID
1301+
Includes a random, time-based, or hash-based UUID.
13021302
13031303
.link:../javadoc/log4j-core/org/apache/logging/log4j/core/pattern/UuidPatternConverter.html[`UuidPatternConverter`] specifier grammar
13041304
[source,text]
13051305
----
1306-
u{RANDOM|TIME}
1307-
uuid{RANDOM|TIME}
1306+
u{RANDOM|TIME|HASH}
1307+
uuid{RANDOM|TIME|HASH}
13081308
----
13091309
1310-
The time-based UUID is a Type 1 UUID generated using the MAC address of each host
1310+
The random UUID is a Type 4 UUID.
1311+
1312+
The time-based UUID is a Type 1 UUID generated using the MAC address of each host.
13111313
To ensure uniqueness across multiple JVMs and/or class loaders on the same host, a random number between 0 and 16,384 will be associated with each instance of the UUID generator class, and included in each time-based UUID generated.
13121314
See also xref:manual/systemproperties.adoc#log4j.uuid.sequence[`log4j.uuid.sequence`].
13131315
Because time-based UUIDs contain the MAC address and timestamp, they should be used with care.
13141316
1317+
The hash-based UUID is a custom Type 8 UUID generated by hashing the LogEvent object. This deterministic UUID is useful for correlating logs when using multiple Appenders.
1318+
13151319
[#format-modifiers]
13161320
=== Format modifiers
13171321

0 commit comments

Comments
 (0)