org.apache.logging.log4j.core.web
Class Log4jServletFilter
java.lang.Object
org.apache.logging.log4j.core.web.Log4jServletFilter
- All Implemented Interfaces:
- Filter
public class Log4jServletFilter
- extends Object
- implements Filter
This is responsible for the following:
- Clearing the logger context when the application has finished starting up.
- Setting the logger context before processing a request and clearing it after processing a request.
- Setting the logger context when the application is starting to shut down.
This filter is a once-per-request filter. It is capable of filtering all the different types of requests
(standard, asynchronous, error, etc.) but will not apply processing if the filter matches multiple times on the same
logical request.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Log4jServletFilter
public Log4jServletFilter()
init
public void init(FilterConfig filterConfig)
throws ServletException
- Specified by:
init
in interface Filter
- Throws:
ServletException
doFilter
public void doFilter(ServletRequest request,
ServletResponse response,
FilterChain chain)
throws IOException,
ServletException
- Specified by:
doFilter
in interface Filter
- Throws:
IOException
ServletException
destroy
public void destroy()
- Specified by:
destroy
in interface Filter
Copyright © 1999-2013 Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.