|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassfish.jersey.filter.LoggingFilter
@PreMatching @Priority(value=-2147483648) public class LoggingFilter
Universal logging filter. Can be used on client or server side. Has the highest priority.
| Constructor Summary | |
|---|---|
LoggingFilter()
Create a logging filter logging the request and response to a default JDK logger, named as the fully qualified class name of this class. |
|
LoggingFilter(Logger logger,
boolean printEntity)
Create a logging filter with custom logger and custom settings of entity logging. |
|
LoggingFilter(Logger logger,
int maxEntitySize)
Creates a logging filter with custom logger and entity logging turned on, but potentially limiting the size of entity to be buffered and logged. |
|
| Method Summary | |
|---|---|
void |
aroundWriteTo(WriterInterceptorContext writerInterceptorContext)
|
void |
filter(ClientRequestContext context)
|
void |
filter(ClientRequestContext requestContext,
ClientResponseContext responseContext)
|
void |
filter(ContainerRequestContext context)
|
void |
filter(ContainerRequestContext requestContext,
ContainerResponseContext responseContext)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LoggingFilter()
public LoggingFilter(Logger logger,
boolean printEntity)
logger - the logger to log requests and responses.printEntity - if true, entity will be logged as well up to the default maxEntitySize, which is 10KB
public LoggingFilter(Logger logger,
int maxEntitySize)
logger - the logger to log requests and responses.maxEntitySize - maximum number of entity bytes to be logged (and buffered) - if the entity is larger,
logging filter will print (and buffer in memory) only the specified number of bytes
and print "...more..." string at the end.| Method Detail |
|---|
public void filter(ClientRequestContext context)
throws IOException
filter in interface ClientRequestFilterIOException
public void filter(ClientRequestContext requestContext,
ClientResponseContext responseContext)
throws IOException
filter in interface ClientResponseFilterIOException
public void filter(ContainerRequestContext context)
throws IOException
filter in interface ContainerRequestFilterIOException
public void filter(ContainerRequestContext requestContext,
ContainerResponseContext responseContext)
throws IOException
filter in interface ContainerResponseFilterIOException
public void aroundWriteTo(WriterInterceptorContext writerInterceptorContext)
throws IOException,
WebApplicationException
aroundWriteTo in interface WriterInterceptorIOException
WebApplicationException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||