## org.red5.logging
Class LoggerContextFilter

    java.lang.Object
      org.red5.logging.LoggerContextFilter

All Implemented Interfaces:
  javax.servlet.Filter

    public class LoggerContextFilter

extends Object
implements javax.servlet.Filter

A servlet filter that puts this contexts LoggerContext into a Threadlocal variable. It removes it after the request is processed. To use it, add the following lines to a web.xml file

            <filter>
                    <filter-name>LoggerContextFilter</filter-name>
                    <filter-class>org.red5.logging.LoggerContextFilter</filter-class>
            </filter>
            <filter-mapping>
                    <filter-name>LoggerContextFilter</filter-name>
                    <url-pattern>/*</url-pattern>
            </filter-mapping>

Author:
  Paul Gregoire (mondain@gmail.com)

Constructor Summary
`LoggerContextFilter()`

Method Summary
`void` `destroy()`
`void` `doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain)`
`void` `init(javax.servlet.FilterConfig config)`

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

Constructor Detail

### LoggerContextFilter

    public LoggerContextFilter()

Method Detail

### destroy

    public void destroy()

  Specified by:
    `destroy` in interface `javax.servlet.Filter`

### doFilter

    public void doFilter(javax.servlet.ServletRequest request,
                         javax.servlet.ServletResponse response,
                         javax.servlet.FilterChain chain)
                  throws IOException,
                         javax.servlet.ServletException

  Specified by:
    `doFilter` in interface `javax.servlet.Filter`
  Throws:
    `IOException`
    `javax.servlet.ServletException`

### init

    public void init(javax.servlet.FilterConfig config)
              throws javax.servlet.ServletException

  Specified by:
    `init` in interface `javax.servlet.Filter`
  Throws:
    `javax.servlet.ServletException`

Copyright © 2006-2010 The Red5 Project