Package org.apache.log4j.spi

Examples of org.apache.log4j.spi.ThrowableRendererSupport


    /**
     * Test of log4j.throwableRenderer support.  See bug 45721.
     */
    public void testThrowableRenderer1() {
        DOMConfigurator.configure("input/xml/throwableRenderer1.xml");
        ThrowableRendererSupport repo = (ThrowableRendererSupport) LogManager.getLoggerRepository();
        MockThrowableRenderer renderer = (MockThrowableRenderer) repo.getThrowableRenderer();
        LogManager.resetConfiguration();
        assertNotNull(renderer);
        assertEquals(true, renderer.isActivated());
        assertEquals(false, renderer.getShowVersion());
    }
View Full Code Here


    public void testThrowableRenderer() {
        Properties props = new Properties();
        props.put("log4j.throwableRenderer", "org.apache.log4j.PropertyConfiguratorTest$MockThrowableRenderer");
        props.put("log4j.throwableRenderer.showVersion", "false");
        PropertyConfigurator.configure(props);
        ThrowableRendererSupport repo = (ThrowableRendererSupport) LogManager.getLoggerRepository();
        MockThrowableRenderer renderer = (MockThrowableRenderer) repo.getThrowableRenderer();
        LogManager.resetConfiguration();
        assertNotNull(renderer);
        assertEquals(true, renderer.isActivated());
        assertEquals(false, renderer.getShowVersion());
    }
View Full Code Here

    public void testThrowableRenderer() {
        Properties props = new Properties();
        props.put("log4j.throwableRenderer", "org.apache.log4j.PropertyConfiguratorTest$MockThrowableRenderer");
        props.put("log4j.throwableRenderer.showVersion", "false");
        PropertyConfigurator.configure(props);
        ThrowableRendererSupport repo = (ThrowableRendererSupport) LogManager.getLoggerRepository();
        MockThrowableRenderer renderer = (MockThrowableRenderer) repo.getThrowableRenderer();
        LogManager.resetConfiguration();
        assertNotNull(renderer);
        assertEquals(true, renderer.isActivated());
        assertEquals(false, renderer.getShowVersion());
    }
View Full Code Here

TOP

Related Classes of org.apache.log4j.spi.ThrowableRendererSupport

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.