@Bean
        @RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
        public FilterRegistrationBean<ThreadContextMDCServletFilter> threadContextMDCServletFilter(
            final CasConfigurationProperties casProperties,
            @Qualifier(TicketRegistrySupport.BEAN_NAME)
            final ObjectProvider<TicketRegistrySupport> ticketRegistrySupport,
            @Qualifier(CasCookieBuilder.BEAN_NAME_TICKET_GRANTING_COOKIE_BUILDER)
            final ObjectProvider<CasCookieBuilder> ticketGrantingTicketCookieGenerator) {
            val filter = new ThreadContextMDCServletFilter(ticketRegistrySupport,
                ticketGrantingTicketCookieGenerator, casProperties);
            val bean = new FilterRegistrationBean<ThreadContextMDCServletFilter>();
            bean.setFilter(filter);
            bean.setAsyncSupported(true);
            bean.setUrlPatterns(CollectionUtils.wrap("/*"));
            bean.setName("threadContextMDCServletFilter");
            bean.setOrder(Ordered.HIGHEST_PRECEDENCE + 2);
            bean.setEnabled(casProperties.getLogging().getMdc().isEnabled());
            return bean;
        }
This is {@link CasCoreLoggingAutoConfiguration}.

@author Misagh Moayyed
@since 5.0.0
core/cas-server-core-logging/src/main/java/org/apereo/cas/config/CasCoreLoggingAutoConfiguration.java