org.glassfish.jersey.filter
Class LoggingFilter
java.lang.Object
org.glassfish.jersey.filter.LoggingFilter
- All Implemented Interfaces:
- PreMatchRequestFilter, RequestFilter, ResponseFilter
@Provider
public class LoggingFilter
- extends java.lang.Object
- implements PreMatchRequestFilter, RequestFilter, 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(java.util.logging.Logger logger,
boolean printEntity)
Create a logging filter with custom logger and custom settings of entity
logging. |
| 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(java.util.logging.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(FilterContext context)
throws java.io.IOException
- Specified by:
preMatchFilter in interface PreMatchRequestFilter
- Throws:
java.io.IOException
postFilter
public void postFilter(FilterContext context)
throws java.io.IOException
- Specified by:
postFilter in interface ResponseFilter
- Throws:
java.io.IOException
preFilter
public void preFilter(FilterContext context)
throws java.io.IOException
- Specified by:
preFilter in interface RequestFilter
- Throws:
java.io.IOException
Copyright © 2007-2012 Oracle Corporation. All Rights Reserved. Use is subject to license terms.