Improve logging
authorMathieu Baudier <mbaudier@argeo.org>
Tue, 24 Feb 2015 20:46:35 +0000 (20:46 +0000)
committerMathieu Baudier <mbaudier@argeo.org>
Tue, 24 Feb 2015 20:46:35 +0000 (20:46 +0000)
git-svn-id: https://svn.argeo.org/commons/trunk@7942 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc

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;
        }