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 voiddestroy()voiddoFilter(ServletRequest request, ServletResponse response, FilterChain chain)voidinit(FilterConfig arg0)
-
-
-
Method Detail
-
doFilter
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws java.io.IOException, ServletException
- Specified by:
doFilterin interfaceFilter- Throws:
java.io.IOExceptionServletException
-
init
public void init(FilterConfig arg0) throws ServletException
- Specified by:
initin interfaceFilter- Throws:
ServletException
-
-