Package org.apache.logging.log4j.core.layout

Examples of org.apache.logging.log4j.core.layout.HTMLLayout


        assertTrue("Expected logfile to exist: " + LOGFILE, logFile.exists());
        assertHeader(logFile);
    }

    private void assertHeader(File file) throws Exception {
        HtmlLayout layout = HtmlLayout.createDefaultLayout();
        String header = new String(layout.getHeader(), Charset.defaultCharset());
        String withoutTimestamp = header.substring(0, 435);
        String contents = new String(slurp(file), Charset.defaultCharset());
        String contentsInitialChunk = contents.substring(0, 435);
        assertEquals(file.getName(), withoutTimestamp, contentsInitialChunk);
    }
View Full Code Here


        String contentsInitialChunk = contents.substring(0, 435);
        assertEquals(file.getName(), withoutTimestamp, contentsInitialChunk);
    }

    private void assertFooter(File file) throws Exception {
        HtmlLayout layout = HtmlLayout.createDefaultLayout();
        String footer = new String(layout.getFooter(), Charset.defaultCharset());
        String contents = new String(slurp(file), Charset.defaultCharset());
        assertTrue(file.getName(), contents.endsWith(footer));
    }
View Full Code Here

TOP

Related Classes of org.apache.logging.log4j.core.layout.HTMLLayout

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.