Improve logging
[lgpl/argeo-commons.git] / org.argeo.server.jcr / src / org / argeo / jackrabbit / JackrabbitContainer.java
index 82d58fb31fdc025cd8d78428cd3c36f21f106319..85e9e203f96e6613746e7f38461b8425fffc144c 100644 (file)
@@ -78,7 +78,7 @@ public class JackrabbitContainer extends JackrabbitWrapper implements
        }
 
        public void init() {
-               long begin = System.currentTimeMillis();
+               // long begin = System.currentTimeMillis();
 
                if (getRepository() != null)
                        throw new ArgeoException(
@@ -92,10 +92,11 @@ public class JackrabbitContainer extends JackrabbitWrapper implements
                // apply new CND files after migration
                prepareDataModel();
 
-               double duration = ((double) (System.currentTimeMillis() - begin)) / 1000;
-               if (log.isDebugEnabled())
-                       log.debug("Initialized JCR repository wrapper in " + duration
-                                       + " s");
+               // double duration = ((double) (System.currentTimeMillis() - begin)) /
+               // 1000;
+               // if (log.isDebugEnabled())
+               // log.debug("Initialized JCR repository wrapper in " + duration
+               // + " s");
        }
 
        /** Actually creates the new repository. */
@@ -246,8 +247,9 @@ public class JackrabbitContainer extends JackrabbitWrapper implements
                                                                + getHomeDirectory());
                                }
                        double duration = ((double) (System.currentTimeMillis() - begin)) / 1000;
-                       log.info("Destroyed Jackrabbit repository in " + duration
-                                       + " s, home: " + getHomeDirectory());
+                       if (log.isTraceEnabled())
+                               log.trace("Destroyed Jackrabbit repository in " + duration
+                                               + " s, home: " + getHomeDirectory());
                }
                repository = null;
        }