Package net.shibboleth.idp.log
Class SLF4JMDCServletFilter
java.lang.Object
net.shibboleth.idp.log.SLF4JMDCServletFilter
- All Implemented Interfaces:
javax.servlet.Filter
Servlet filter that sets some interesting MDC attributes as the request comes in and clears the MDC as the response
is returned.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
MDC attribute name for client address.private boolean
Whether to create a session if it doesn't already exist.static final String
MDC attribute name for container session ID.static final String
MDC attribute name for host name of the server to which the current request was sent.static final String
MDC attribute name for port number to which the current request was sent. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
SERVER_ADDRESS_MDC_ATTRIBUTE
MDC attribute name for host name of the server to which the current request was sent.- See Also:
-
SERVER_PORT_MDC_ATTRIBUTE
MDC attribute name for port number to which the current request was sent.- See Also:
-
CLIENT_ADDRESS_MDC_ATTRIBUTE
MDC attribute name for client address.- See Also:
-
JSESSIONID_MDC_ATTRIBUTE
MDC attribute name for container session ID.- See Also:
-
createSession
private boolean createSessionWhether to create a session if it doesn't already exist.
-
-
Constructor Details
-
SLF4JMDCServletFilter
public SLF4JMDCServletFilter()
-
-
Method Details
-
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 interfacejavax.servlet.Filter
- Throws:
IOException
javax.servlet.ServletException
-
init
public void init(javax.servlet.FilterConfig filterConfig) throws javax.servlet.ServletException - Specified by:
init
in interfacejavax.servlet.Filter
- Throws:
javax.servlet.ServletException
-
destroy
public void destroy()- Specified by:
destroy
in interfacejavax.servlet.Filter
-