Examples of MemoryTarget


Examples of org.apache.log.output.MemoryTarget

    public void testMemoryTarget1()
        throws Exception
    {
        final ByteArrayOutputStream output = new ByteArrayOutputStream();
        final StreamTarget other = new StreamTarget( output, FORMATTER );
        final MemoryTarget target = new MemoryTarget( other, 1, Priority.FATAL_ERROR );
        doStreamOutputTest( output, target );
    }
View Full Code Here

Examples of org.apache.log.output.MemoryTarget

    public void testMemoryTarget2()
        throws Exception
    {
        final ByteArrayOutputStream output = new ByteArrayOutputStream();
        final StreamTarget other = new StreamTarget( output, FORMATTER );
        final MemoryTarget target = new MemoryTarget( other, 10, Priority.DEBUG );
        doStreamOutputTest( output, target );
    }
View Full Code Here

Examples of org.apache.log.output.MemoryTarget

    public void testMemoryTarget3()
        throws Exception
    {
        final ByteArrayOutputStream output = new ByteArrayOutputStream();
        final StreamTarget other = new StreamTarget( output, FORMATTER );
        final MemoryTarget target = new MemoryTarget( other, 10, Priority.FATAL_ERROR );

        final Logger logger = getNewLogger( target );

        //Head output should not be pushed yet
        final String head = getResult( output );
        assertEquals( "Targets Head output", "", head );

        //Not pushed yet
        logger.debug( M1 );
        final String result1 = getResult( output );
        assertEquals( "Targets R1 debug output", "", result1 );

        target.push();
        final String resultPP = getResult( output );
        assertEquals( "Targets HEAD+R1 debug output", HEAD + R1, resultPP );

        logger.debug( M2 );
        final String result2 = getResult( output );
View Full Code Here

Examples of org.apache.log.output.MemoryTarget

    public void testMemoryTarget1()
        throws Exception
    {
        final ByteArrayOutputStream output = new ByteArrayOutputStream();
        final StreamTarget other = new StreamTarget( output, FORMATTER );
        final MemoryTarget target = new MemoryTarget( other, 1, Priority.FATAL_ERROR );
        doStreamOutputTest( output, target );
    }
View Full Code Here

Examples of org.apache.log.output.MemoryTarget

    public void testMemoryTarget2()
        throws Exception
    {
        final ByteArrayOutputStream output = new ByteArrayOutputStream();
        final StreamTarget other = new StreamTarget( output, FORMATTER );
        final MemoryTarget target = new MemoryTarget( other, 10, Priority.DEBUG );
        doStreamOutputTest( output, target );
    }
View Full Code Here

Examples of org.apache.log.output.MemoryTarget

    public void testMemoryTarget3()
        throws Exception
    {
        final ByteArrayOutputStream output = new ByteArrayOutputStream();
        final StreamTarget other = new StreamTarget( output, FORMATTER );
        final MemoryTarget target = new MemoryTarget( other, 10, Priority.FATAL_ERROR );

        final Logger logger = getNewLogger( target );

        //Head output should not be pushed yet
        final String head = getResult( output );
        assertEquals( "Targets Head output", "", head );

        //Not pushed yet
        logger.debug( M1 );
        final String result1 = getResult( output );
        assertEquals( "Targets R1 debug output", "", result1 );

        target.push();
        final String resultPP = getResult( output );
        assertEquals( "Targets HEAD+R1 debug output", HEAD + R1, resultPP );

        logger.debug( M2 );
        final String result2 = getResult( output );
View Full Code Here

Examples of org.apache.log.output.MemoryTarget

    public void testMemoryTarget1()
        throws Exception
    {
        final ByteArrayOutputStream output = new ByteArrayOutputStream();
        final StreamTarget other = new StreamTarget( output, FORMATTER );
        final MemoryTarget target = new MemoryTarget( other, 1, Priority.FATAL_ERROR );
        doStreamOutputTest( output, target );
    }
View Full Code Here

Examples of org.apache.log.output.MemoryTarget

    public void testMemoryTarget2()
        throws Exception
    {
        final ByteArrayOutputStream output = new ByteArrayOutputStream();
        final StreamTarget other = new StreamTarget( output, FORMATTER );
        final MemoryTarget target = new MemoryTarget( other, 10, Priority.DEBUG );
        doStreamOutputTest( output, target );
    }
View Full Code Here

Examples of org.apache.log.output.MemoryTarget

    public void testMemoryTarget3()
        throws Exception
    {
        final ByteArrayOutputStream output = new ByteArrayOutputStream();
        final StreamTarget other = new StreamTarget( output, FORMATTER );
        final MemoryTarget target = new MemoryTarget( other, 10, Priority.FATAL_ERROR );

        final Logger logger = getNewLogger( target );

        //Head output should not be pushed yet
        final String head = getResult( output );
        assertEquals( "Targets Head output", "", head );

        //Not pushed yet
        logger.debug( M1 );
        final String result1 = getResult( output );
        assertEquals( "Targets R1 debug output", "", result1 );

        target.push();
        final String resultPP = getResult( output );
        assertEquals( "Targets HEAD+R1 debug output", HEAD + R1, resultPP );

        logger.debug( M2 );
        final String result2 = getResult( output );
View Full Code Here

Examples of org.apache.log.output.MemoryTarget

    public void testMemoryTarget1()
        throws Exception
    {
        final ByteArrayOutputStream output = new ByteArrayOutputStream();
        final StreamTarget other = new StreamTarget( output, FORMATTER );
        final MemoryTarget target = new MemoryTarget( other, 1, Priority.FATAL_ERROR );
        doStreamOutputTest( output, target );
    }
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.