Examples of SetLoggingContextHelper


Examples of com.alibaba.citrus.webx.util.SetLoggingContextHelper

    }

    @Test
    public void create() {
        try {
            new SetLoggingContextHelper(null);
            fail();
        } catch (IllegalArgumentException e) {
            assertThat(e, exception("request"));
        }
    }
View Full Code Here

Examples of com.alibaba.citrus.webx.util.SetLoggingContextHelper

            return "Development Mode";
        }
    }

    public void invoke(PipelineContext pipelineContext) throws Exception {
        SetLoggingContextHelper helper = new SetLoggingContextHelper(request);

        Map<String, String> extra = singletonMap(MDC_PRODUCTION_MODE, getProductionModeDesc());

        try {
            helper.setLoggingContext(extra);
            pipelineContext.invokeNext();
        } finally {
            helper.clearLoggingContext();
        }
    }
View Full Code Here

Examples of com.alibaba.citrus.webx.util.SetLoggingContextHelper

*/
public class SetLoggingContextFilter extends FilterBean {
    @Override
    public void doFilter(HttpServletRequest request, HttpServletResponse response, FilterChain chain)
            throws IOException, ServletException {
        SetLoggingContextHelper helper = new SetLoggingContextHelper(request);

        try {
            helper.setLoggingContext();

            chain.doFilter(request, response);
        } finally {
            helper.clearLoggingContext();
        }
    }
View Full Code Here

Examples of com.alibaba.citrus.webx.util.SetLoggingContextHelper

*/
public class SetLoggingContextFilter extends FilterBean {
    @Override
    public void doFilter(HttpServletRequest request, HttpServletResponse response, FilterChain chain)
            throws IOException, ServletException {
        SetLoggingContextHelper helper = new SetLoggingContextHelper(request);

        try {
            helper.setLoggingContext();

            chain.doFilter(request, response);
        } finally {
            helper.clearLoggingContext();
        }
    }
View Full Code Here

Examples of com.alibaba.citrus.webx.util.SetLoggingContextHelper

            return "Development Mode";
        }
    }

    public void invoke(PipelineContext pipelineContext) throws Exception {
        SetLoggingContextHelper helper = new SetLoggingContextHelper(request);

        Map<String, String> extra = singletonMap(MDC_PRODUCTION_MODE, getProductionModeDesc());

        try {
            helper.setLoggingContext(extra);
            pipelineContext.invokeNext();
        } finally {
            helper.clearLoggingContext();
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.