From 01c93d4b34eab24aef57f4661b14881642c8a5f8 Mon Sep 17 00:00:00 2001 From: mturk Date: Thu, 14 Dec 2006 09:56:05 +0000 Subject: [PATCH] Log the loaded tomcat native version on startup. git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@487152 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/catalina/core/AprLifecycleListener.java | 19 +++++++++++++++---- java/org/apache/catalina/core/LocalStrings.properties | 3 ++- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/java/org/apache/catalina/core/AprLifecycleListener.java b/java/org/apache/catalina/core/AprLifecycleListener.java index aacf5b76a..00da45115 100644 --- a/java/org/apache/catalina/core/AprLifecycleListener.java +++ b/java/org/apache/catalina/core/AprLifecycleListener.java @@ -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; } diff --git a/java/org/apache/catalina/core/LocalStrings.properties b/java/org/apache/catalina/core/LocalStrings.properties index 28ce70549..9dd89aa49 100644 --- a/java/org/apache/catalina/core/LocalStrings.properties +++ b/java/org/apache/catalina/core/LocalStrings.properties @@ -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 -- 2.11.0