Package org.apache.sling.discovery.impl.setup

Examples of org.apache.sling.discovery.impl.setup.WithholdingAppender


    public void testSevenInstances() throws Throwable {
      doTest(7, 10);
    }

    private void doTest(final int size, final int loopCnt) throws Throwable {
        WithholdingAppender withholdingAppender = null;
        boolean failure = true;
        try{
            logger.info("doTest("+size+","+loopCnt+"): muting log output...");
            withholdingAppender = WithholdingAppender.install();
            doDoTest(size, loopCnt);
            failure = false;
        } finally {
            if (withholdingAppender!=null) {
                if (failure) {
                    logger.info("doTest("+size+","+loopCnt+"): writing muted log output due to failure...");
                }
                withholdingAppender.release(failure);
                if (!failure) {
                    logger.info("doTest("+size+","+loopCnt+"): not writing muted log output due to success...");
                }
            }
            logger.info("doTest("+size+","+loopCnt+"): unmuted log output.");
View Full Code Here

TOP

Related Classes of org.apache.sling.discovery.impl.setup.WithholdingAppender

Copyright © 2018 www.massapicom. 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.