public class LogRecordComparator
extends java.lang.Object
implements java.util.Comparator<java.util.logging.LogRecord>
LogRecord objects, which uses the log level, timestamp, and log sequence number for comparison.
From PriorityQueue: "The head of this queue is the least element with respect to the specified ordering.".
Since we want the most important and oldest log messages first at the head, a higher level value and a smaller time value
will result in a lower ordering position.
Level takes precedence over time.
| Modifier and Type | Method and Description |
|---|---|
int |
compare(java.util.logging.LogRecord lr1,
java.util.logging.LogRecord lr2) |