Constructor and Description |
---|
ErrorLoggingFilter()
Log to system out
|
ErrorLoggingFilter(PrintStream stream)
Instantiate a error logger using a specific print stream
|
Modifier and Type | Method and Description |
---|---|
static Filter |
errorLogger()
Create a new error logging filter without using the "new" operator.
|
Response |
filter(FilterableRequestSpecification requestSpec,
FilterableResponseSpecification responseSpec,
FilterContext ctx)
Filter the incoming request and response specifications and outgoing response.
|
static Filter |
logErrorsTo(PrintStream stream)
Create a new error logging filter without using the "new" operator.
|
public ErrorLoggingFilter()
public ErrorLoggingFilter(PrintStream stream)
stream
- The stream to log errors to.public static Filter errorLogger()
public static Filter logErrorsTo(PrintStream stream)
stream
- The print stream to log topublic Response filter(FilterableRequestSpecification requestSpec, FilterableResponseSpecification responseSpec, FilterContext ctx)
Filter
FilterContext.next(FilterableRequestSpecification, FilterableResponseSpecification)
when you're done otherwise the request will not be delivered.
It's of course possible to abort the filter chain execution by returning a Response
directly.filter
in interface Filter
requestSpec
- The incoming request specresponseSpec
- The incoming response specctx
- The filter context. You need to call FilterContext.next(FilterableRequestSpecification, FilterableResponseSpecification)
when you're done otherwise the request will not be delivered.Copyright © 2010–2019. All rights reserved.