| org.restlet.Filter com.noelios.restlet.LogFilter
LogFilter | public class LogFilter extends Filter (Code) | | 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.
See Also: Tutorial: Filters and
* call logging author: Jerome Louvel (contact@noelios.com) |
Method Summary | |
protected void | afterHandle(Request request, Response response) Allows filtering after processing by the next Restlet. | protected void | beforeHandle(Request request, Response response) Allows filtering before processing by the next Restlet. | protected String | format(Request request, Response response) Format a log entry.
Parameters: request - The request to log. Parameters: response - The response to log. | protected String | formatDefault(Request request, Response response, int duration) Format a log entry using the default format.
Parameters: request - The request to log. Parameters: response - The response to log. Parameters: duration - The call duration (in milliseconds). |
logTemplate | protected Template logTemplate(Code) | | The log template to use.
|
LogFilter | public LogFilter(Context context, LogService logService)(Code) | | Constructor.
Parameters: context - The context. Parameters: logService - The log service descriptor. |
afterHandle | protected void afterHandle(Request request, Response response)(Code) | | Allows filtering after processing by the next Restlet. Log the call.
Parameters: request - The request to handle. Parameters: response - The response to update. |
beforeHandle | protected void beforeHandle(Request request, Response response)(Code) | | Allows filtering before processing by the next Restlet. Save the start
time.
Parameters: request - The request to handle. Parameters: response - The response to update. |
format | protected String format(Request request, Response response)(Code) | | Format a log entry.
Parameters: request - The request to log. Parameters: response - The response to log. The formatted log entry. |
formatDefault | protected String formatDefault(Request request, Response response, int duration)(Code) | | Format a log entry using the default format.
Parameters: request - The request to log. Parameters: response - The response to log. Parameters: duration - The call duration (in milliseconds). The formatted log entry. |
|
|