Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.logging.log4j.web
Class Log4jServletFilter

    java.lang.Object
      org.apache.logging.log4j.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.

Constructor Summary
`Log4jServletFilter()`

Method Summary
`void` | `destroy()`
`void` | `doFilter(ServletRequest request, ServletResponse response, FilterChain chain)`
`void` | `init(FilterConfig filterConfig)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Log4jServletFilter

    public Log4jServletFilter()

Method Detail

### 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`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1999-2015 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.