Navigation Menu

Skip to content

Commit

Permalink
Add logging to indicate which repository config is being used
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Woods committed Jun 14, 2013
1 parent 6a54010 commit bf858e2
Showing 1 changed file with 9 additions and 0 deletions.
Expand Up @@ -17,9 +17,13 @@
import org.modeshape.jcr.JcrRepositoryFactory;
import org.modeshape.jcr.api.Repository;
import org.modeshape.jcr.api.RepositoryFactory;
import org.slf4j.Logger;
import org.springframework.beans.factory.FactoryBean;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;

import static org.slf4j.LoggerFactory.getLogger;

/**
* @todo Add Documentation.
* @author Edwin Shin
Expand All @@ -28,6 +32,8 @@
public class ModeShapeRepositoryFactoryBean implements
FactoryBean<JcrRepository> {

private static final Logger LOGGER = getLogger(ModeShapeRepositoryFactoryBean.class);

@Inject
private JcrRepositoryFactory jcrRepositoryFactory;

Expand All @@ -40,6 +46,9 @@ public class ModeShapeRepositoryFactoryBean implements
*/
@PostConstruct
public void buildRepository() throws RepositoryException, IOException {
LOGGER.debug("Using repo config: {}",
((ClassPathResource) repositoryConfiguration).getPath());

repository =
(JcrRepository) jcrRepositoryFactory.getRepository(Collections
.singletonMap(RepositoryFactory.URL,
Expand Down

0 comments on commit bf858e2

Please sign in to comment.