public class AccessLogProbe extends HttpServerProbe.Adapter
HttpServerProbe.Adapter| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_STATUS_THRESHOLD
The minimum response status that will trigger an entry in an access log configured by this instance
(default, log everything).
|
| Constructor and Description |
|---|
AccessLogProbe(AccessLogAppender appender,
AccessLogFormat format)
Create a new
AccessLogProbe formatting data with the specified format and
appending it to the specified appender. |
AccessLogProbe(AccessLogAppender appender,
AccessLogFormat format,
int statusThreshold)
Create a new
AccessLogProbe formatting data with the specified format and
appending it to the specified appender. |
| Modifier and Type | Method and Description |
|---|---|
void |
onRequestCompleteEvent(HttpServerFilter filter,
org.glassfish.grizzly.Connection connection,
Response response)
Receive notification of the completion of a
Response an possibly trigger an access log entry generation. |
void |
onRequestReceiveEvent(HttpServerFilter filter,
org.glassfish.grizzly.Connection connection,
Request request)
Instrument the specified
Request with an attribute marking its received time (in
nanoseconds). |
onBeforeServiceEvent, onRequestCancelEvent, onRequestResumeEvent, onRequestSuspendEvent, onRequestTimeoutEventpublic static final int DEFAULT_STATUS_THRESHOLD
public AccessLogProbe(AccessLogAppender appender, AccessLogFormat format)
AccessLogProbe formatting data with the specified format and
appending it to the specified appender.public AccessLogProbe(AccessLogAppender appender, AccessLogFormat format, int statusThreshold)
AccessLogProbe formatting data with the specified format and
appending it to the specified appender.
Only responses with status over the specified threshold will be logged, for example a threshold of
500 will only generate log entries for requests that terminated in error.
public void onRequestReceiveEvent(HttpServerFilter filter, org.glassfish.grizzly.Connection connection, Request request)
Request with an attribute marking its received time (in
nanoseconds).onRequestReceiveEvent in interface HttpServerProbeonRequestReceiveEvent in class HttpServerProbe.Adapterfilter - HttpServerFilter, the event belongs to.connection - Connection, the event belongs to.request - received Request.public void onRequestCompleteEvent(HttpServerFilter filter, org.glassfish.grizzly.Connection connection, Response response)
Response an possibly trigger an access log entry generation.onRequestCompleteEvent in interface HttpServerProbeonRequestCompleteEvent in class HttpServerProbe.Adapterfilter - HttpServerFilter, the event belongs to.connection - Connection, the event belongs to.response - sent Response.Copyright © 2017–2021 Oracle Corporation. All rights reserved.