Code example for LogManager

Methods: readConfiguration

0
        handler = new MemoryHandler();
    } 
 
    @Override protected void tearDown() throws Exception { 
        super.tearDown(); 
        manager.readConfiguration();
        props.clear();
    } 
 
    public static InputStream propertiesToInputStream(Properties p) throws IOException {
        ByteArrayOutputStream bos = new ByteArrayOutputStream();
        p.store(bos, "");
        return new ByteArrayInputStream(bos.toByteArray());
    } 
 
    private void initProps() { 
        props.put("java.util.logging.MemoryHandler.level", "FINE");
        props.put("java.util.logging.MemoryHandler.filter", baseClassName + "$MockFilter");
        props.put("java.util.logging.MemoryHandler.size", "2");
        props.put("java.util.logging.MemoryHandler.push", "WARNING");
        props.put("java.util.logging.MemoryHandler.target", baseClassName + "$MockHandler");