Interface QlogSink
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Receives qlog-style connection events, for debugging: packets sent, received and lost, recovery
metrics, key updates and state changes. Event names follow the qlog schema (
transport:packet_sent, recovery:packet_lost, ...); the data is a small JSON object.
Implementations must be thread-safe: connections report from their own threads. Events are only built when a sink is configured, so an absent sink costs nothing.
-
Method Summary
Modifier and TypeMethodDescriptionvoidRecords one event.static QlogSinklogger(System.Logger logger) A sink that writes each event as one JSON line to aSystem.LoggeratDEBUG.
-
Method Details
-
event
Records one event.- Parameters:
connection- the connection's original Destination Connection ID, in hexadecimaltimeNanos- the time of the event on the connection's clockname- the qlog event name, such astransport:packet_sentdata- the event data as a JSON object
-
logger
A sink that writes each event as one JSON line to aSystem.LoggeratDEBUG.- Parameters:
logger- the logger- Returns:
- the sink
-