Log the loaded tomcat native version on startup.
authormturk <mturk@13f79535-47bb-0310-9956-ffa450edef68>
Thu, 14 Dec 2006 09:56:05 +0000 (09:56 +0000)
committermturk <mturk@13f79535-47bb-0310-9956-ffa450edef68>
Thu, 14 Dec 2006 09:56:05 +0000 (09:56 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@487152 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/catalina/core/AprLifecycleListener.java
java/org/apache/catalina/core/LocalStrings.properties

index aacf5b7..00da451 100644 (file)
@@ -75,13 +75,16 @@ public class AprLifecycleListener
     public void lifecycleEvent(LifecycleEvent event) {
 
         if (Lifecycle.INIT_EVENT.equals(event.getType())) {
-            aprInitialized = initializeAPR();
+            aprInitialized = init();
             if (aprInitialized) {
                 try {
                     initializeSSL();
                 } catch (Throwable t) {
-                    log.error(sm.getString("aprListener.sslInit",
-                                           t.getMessage()), t);
+                    if (!log.isDebugEnabled()) {
+                        log.info(sm.getString("aprListener.sslInit"));
+                    } else {
+                        log.debug(sm.getString("aprListener.sslInit"));
+                    }
                 }
             }
         } else if (Lifecycle.AFTER_STOP_EVENT.equals(event.getType())) {
@@ -111,7 +114,7 @@ public class AprLifecycleListener
         method.invoke(null, (Object []) null);
     }
 
-    private boolean initializeAPR()
+    private boolean init()
     {
         int major = 0;
         int minor = 0;
@@ -173,6 +176,14 @@ public class AprLifecycleListener
                         TCN_RECOMMENDED_PV));
             }
         }
+        if (!log.isDebugEnabled()) {
+           log.info(sm.getString("aprListener.tcnValid", major + "."
+                    + minor + "." + patch));
+        }
+        else {
+           log.debug(sm.getString("aprListener.tcnValid", major + "."
+                     + minor + "." + patch));
+        }
         return true;
     }
 
index 28ce705..9dd89aa 100644 (file)
@@ -20,7 +20,8 @@ aprListener.aprInit=The Apache Tomcat Native library which allows optimal perfor
 aprListener.tcnInvalid=An incompatible version {0} of the Apache Tomcat Native library is installed, while Tomcat requires version {1} 
 aprListener.tcnVersion=An older version {0} of the Apache Tomcat Native library is installed, while Tomcat recommends version greater then {1}
 aprListener.aprDestroy=Failed shutdown of Apache Portable Runtime
-aprListener.sslInit=Unable to initialize the SSLEngine, failed with message: {0}
+aprListener.sslInit=Failed to initialize the SSLEngine.
+aprListener.tcnValid=Apache Tomcat Native library {0} loaded.
 containerBase.addDefaultMapper=Exception configuring default mapper of class {0}
 containerBase.alreadyStarted=Container {0} has already been started
 containerBase.notConfigured=No basic Valve has been configured