org.restlet.engine.log
Class LogFilter
java.lang.Object
org.restlet.Restlet
org.restlet.routing.Filter
org.restlet.engine.log.LogFilter
- All Implemented Interfaces:
- Uniform
public class LogFilter
- extends Filter
Filter logging all calls after their handling by the target Restlet. The
current format is similar to IIS 6 logs. The logging is based on the
java.util.logging package.
Concurrency note: instances of this class or its subclasses can be invoked by
several threads at the same time and therefore must be thread-safe. You
should be especially careful when storing state in member variables.
- Author:
- Jerome Louvel
Methods inherited from class org.restlet.Restlet |
createFinder, finalize, getApplication, getAuthor, getContext, getDescription, getFinderClass, getLogger, getName, getOwner, handle, handle, handle, isStarted, isStopped, setAuthor, setContext, setDescription, setFinderClass, setName, setOwner |
logService
protected volatile LogService logService
- The log service.
LogFilter
public LogFilter(Context context,
LogService logService)
- Constructor.
- Parameters:
context
- The context.logService
- The log service descriptor.
afterHandle
protected void afterHandle(Request request,
Response response)
- Allows filtering after processing by the next Restlet. Logs the call.
- Overrides:
afterHandle
in class Filter
- Parameters:
request
- The request to handle.response
- The response to update.
beforeHandle
protected int beforeHandle(Request request,
Response response)
- Allows filtering before processing by the next Restlet. Saves the start
time.
- Overrides:
beforeHandle
in class Filter
- Parameters:
request
- The request to handle.response
- The response to update.
- Returns:
- The continuation status.
Copyright © 2005-2013 Restlet.