Search in sources :

Example 1 with Slf4jLogWriterProvider

use of org.apache.jackrabbit.spi.commons.logging.Slf4jLogWriterProvider in project jackrabbit by apache.

the class RepositoryFactoryImplTest method testGetRepositoryWithLogger.

public void testGetRepositoryWithLogger() throws RepositoryException {
    List<Object> lwprovider = new ArrayList<Object>();
    lwprovider.add(null);
    lwprovider.add(true);
    lwprovider.add(new Slf4jLogWriterProvider());
    Map<String, Object> params = new HashMap<String, Object>();
    params.put("org.apache.jackrabbit.jcr2spi.RepositoryConfig", RepositoryConfigImpl.INSTANCE);
    for (Object aLwprovider : lwprovider) {
        params.put("org.apache.jackrabbit.spi.commons.logging.LogWriterProvider", aLwprovider);
        Repository repo = factory.getRepository(params);
        assertNotNull(repo);
    }
}
Also used : Repository(javax.jcr.Repository) HashMap(java.util.HashMap) ArrayList(java.util.ArrayList) Slf4jLogWriterProvider(org.apache.jackrabbit.spi.commons.logging.Slf4jLogWriterProvider)

Aggregations

ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 Repository (javax.jcr.Repository)1 Slf4jLogWriterProvider (org.apache.jackrabbit.spi.commons.logging.Slf4jLogWriterProvider)1