Class RestDebugPipeline
The request-start half is handled by RestContext/RestOpContext, which install bounded body-caching
wrappers only when the resolved logger is loggable at FINEST. This class re-derives the cumulative
tier from the resolved logger, renders a single cumulative message through the resolved RestDebugFormatter,
and emits exactly one LogRecord:
- tier
INFO—formatBasiconly. - tier
FINE—+formatHeaders. - tier
FINEST—+formatBody(from the cached bytes). - coarser than
INFO(WARNING,SEVERE,OFF) — nothing is emitted.
Level.INFO; the resolved tier controls message detail only.- Since:
- 10.0.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidcaptureAsyncSnapshot(RestSession session) Resolves the logger/formatter/detail-tier snapshot for the given session and stashes it on the session for later completion-path emission.static voidemit(RestSession session) Emits one debug record for the completed call on the synchronous request thread, if the resolved logger's effective level warrants it.static voidemitOnCompletion(RestSession session) Emits one debug record for a completed asynchronous call on the response-completion thread.
-
Method Details
-
emit
Emits one debug record for the completed call on the synchronous request thread, if the resolved logger's effective level warrants it.This is the synchronous entry point: it resolves the logger/formatter/detail-tier now (the operation is already resolved by finish time) and renders/emits immediately. The emitted record is always stamped at
Level.INFO; the resolved tier controls only which sections are rendered into the message body.- Parameters:
session- The completed REST session. Must not benull .
-
captureAsyncSnapshot
Resolves the logger/formatter/detail-tier snapshot for the given session and stashes it on the session for later completion-path emission.Called on the request thread at the async-dispatch handoff, before any completion callback is registered, so the immutable snapshot is safely published to the completion thread. Stashes
null when access logging is off (no allocation), keepingemitOnCompletion(RestSession)a no-op in that case.- Parameters:
session- The REST session being handed off to async dispatch. Must not benull .
-
emitOnCompletion
Emits one debug record for a completed asynchronous call on the response-completion thread.Reads the snapshot published on the request thread (via
captureAsyncSnapshot(RestSession)), sets finish-time attributes (such asExecTime) immediately before rendering, and renders from the final request/response state now that the async body and headers have been written. No-ops when no snapshot was stashed (access logging off). Any diagnostic-formatting failure is contained so it cannot disrupt request cleanup or async-context completion.- Parameters:
session- The completed REST session. Can benull (no-op).
-