org.glassfish.jersey.filter
Class LoggingFilter
java.lang.Object
org.glassfish.jersey.filter.LoggingFilter
- All Implemented Interfaces:
- javax.ws.rs.ext.PreMatchRequestFilter, javax.ws.rs.ext.RequestFilter, javax.ws.rs.ext.ResponseFilter
@Provider
public class LoggingFilter
- extends Object
- implements javax.ws.rs.ext.PreMatchRequestFilter, javax.ws.rs.ext.RequestFilter, javax.ws.rs.ext.ResponseFilter
Universal logging filter.
Can be used on client or server side. Has the highest priority.
- Author:
- Pavel Bucek (pavel.bucek at oracle.com)
|
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. |
|
Method Summary |
void |
postFilter(javax.ws.rs.ext.FilterContext context)
|
void |
preFilter(javax.ws.rs.ext.FilterContext context)
|
void |
preMatchFilter(javax.ws.rs.ext.FilterContext context)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LoggingFilter
public 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. Entity
logging is turned on.
LoggingFilter
public LoggingFilter(Logger logger,
boolean printEntity)
- Create a logging filter with custom logger and custom settings of entity
logging.
- Parameters:
logger - the logger to log requests and responses.printEntity - if true, entity will be logged as well.
preMatchFilter
public void preMatchFilter(javax.ws.rs.ext.FilterContext context)
throws IOException
- Specified by:
preMatchFilter in interface javax.ws.rs.ext.PreMatchRequestFilter
- Throws:
IOException
postFilter
public void postFilter(javax.ws.rs.ext.FilterContext context)
throws IOException
- Specified by:
postFilter in interface javax.ws.rs.ext.ResponseFilter
- Throws:
IOException
preFilter
public void preFilter(javax.ws.rs.ext.FilterContext context)
throws IOException
- Specified by:
preFilter in interface javax.ws.rs.ext.RequestFilter
- Throws:
IOException
Copyright © 2007-2012 Oracle Corporation. All Rights Reserved. Use is subject to license terms.