org.slf4j.Logger
Logger log = ... instance of org.slf4j.Logger ... Persistit.setPersistitLogger(new Slf4jAdapter(logger));
5960616263646566676869
private void initPersistit() { try { tempDir = tempFolder.newDir("caches"); persistit = new Persistit(); persistit.setPersistitLogger(new Slf4jAdapter(LoggerFactory.getLogger("PERSISTIT"))); Properties props = new Properties(); props.setProperty("datapath", tempDir.getAbsolutePath()); props.setProperty("logpath", "${datapath}/log"); props.setProperty("logfile", "${logpath}/persistit_${timestamp}.log"); props.setProperty("buffer.count.8192", "10");
107108109110111112113114115116117
} catch (FileNotFoundException e) { throw new ConfigurationPropertiesLoadException ("Persistit Properties", e.getMessage()); } Persistit tmpDB = new Persistit(); tmpDB.setPersistitLogger(new Slf4jAdapter(LOG)); try { tmpDB.setConfiguration(new Configuration(properties)); tmpDB.initialize(); } catch (PersistitException e1) { throw new PersistitAdapterException(e1);