Class LoggerContextFilter
- java.lang.Object
-
- ch.qos.logback.classic.selector.servlet.LoggerContextFilter
-
- All Implemented Interfaces:
Filter
public class LoggerContextFilter extends java.lang.Object implements Filter
A servlet filter that puts the environment dependent LoggerContext in a ThreadLocal variable, removing it after the request is processed.To use it, add the following lines to a web.xml file
LoggerContextFilter ch.qos.logback.classic.selector.servlet.LoggerContextFilter LoggerContextFilter /*
-
-
Constructor Summary
Constructors Constructor Description LoggerContextFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
destroy()
void
doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
void
init(FilterConfig arg0)
-
-
-
Method Detail
-
doFilter
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws java.io.IOException, ServletException
- Specified by:
doFilter
in interfaceFilter
- Throws:
java.io.IOException
ServletException
-
init
public void init(FilterConfig arg0) throws ServletException
- Specified by:
init
in interfaceFilter
- Throws:
ServletException
-
-