Top Description Fields Constructors Methods
org.glassfish.grizzly.http.server.accesslog

public Class AccessLogProbe

extends Adapter
Class Inheritance
Static Imports
java.util.logging.Level.WARNING

A Grizzly probe used to provide access logs generation.
Authors
Pier Fumagalli, USRZ.com

Field Summary

Modifier and TypeField and Description
private final AccessLogAppender
private static final String
public static final int
DEFAULT_STATUS_THRESHOLD

The minimum response status that will trigger an entry in an access log configured by this instance (default, log everything).

private final AccessLogFormat
private static final Logger
private final int

Constructor Summary

AccessConstructor and Description
public
AccessLogProbe(AccessLogAppender appender, AccessLogFormat format)

Create a new AccessLogProbe formatting data with the specified format and appending it to the specified appender.

public
AccessLogProbe(AccessLogAppender appender, AccessLogFormat format, int statusThreshold)

Create a new AccessLogProbe formatting data with the specified format and appending it to the specified appender.

Method Summary

Modifier and TypeMethod and Description
public void
onRequestCompleteEvent(HttpServerFilter filter, Connection<L> connection, Response response)

Overrides org.glassfish.grizzly.http.server.HttpServerProbe.Adapter.onRequestCompleteEvent.

Implements org.glassfish.grizzly.http.server.HttpServerProbe.onRequestCompleteEvent.

Receive notification of the completion of a Response an possibly trigger an access log entry generation.

public void
Inherited from org.glassfish.grizzly.http.server.HttpServerProbe.Adapter:
onBeforeServiceEventonRequestCancelEventonRequestResumeEventonRequestSuspendEventonRequestTimeoutEvent

Field Detail

appenderback to summary
private final AccessLogAppender appender
ATTRIBUTE_TIME_STAMPback to summary
private static final String ATTRIBUTE_TIME_STAMP
DEFAULT_STATUS_THRESHOLDback to summary
public static final int DEFAULT_STATUS_THRESHOLD

The minimum response status that will trigger an entry in an access log configured by this instance (default, log everything).

formatback to summary
private final AccessLogFormat format
LOGGERback to summary
private static final Logger LOGGER
statusThresholdback to summary
private final int statusThreshold

Constructor Detail

AccessLogProbeback to summary
public AccessLogProbe(AccessLogAppender appender, AccessLogFormat format)

Create a new AccessLogProbe formatting data with the specified format and appending it to the specified appender.

AccessLogProbeback to summary
public AccessLogProbe(AccessLogAppender appender, AccessLogFormat format, int statusThreshold)

Create a new 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.

Method Detail

onRequestCompleteEventback to summary
public void onRequestCompleteEvent(HttpServerFilter filter, Connection<L> connection, Response response)

Overrides org.glassfish.grizzly.http.server.HttpServerProbe.Adapter.onRequestCompleteEvent.

Implements org.glassfish.grizzly.http.server.HttpServerProbe.onRequestCompleteEvent.

Receive notification of the completion of a Response an possibly trigger an access log entry generation.

Annotations
@Override
@SuppressWarnings:rawtypes
onRequestReceiveEventback to summary
public void onRequestReceiveEvent(HttpServerFilter filter, Connection<L> connection, Request request)

Overrides org.glassfish.grizzly.http.server.HttpServerProbe.Adapter.onRequestReceiveEvent.

Implements org.glassfish.grizzly.http.server.HttpServerProbe.onRequestReceiveEvent.

Instrument the specified Request with an attribute marking its received time (in nanoseconds).

Annotations
@Override
@SuppressWarnings:rawtypes