tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject [tomcat] 03/08: Add logging
Date Tue, 01 Oct 2019 14:49:52 GMT
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 53ba262df40a210de0a047912d33865069e137b3
Author: Mark Thomas <markt@apache.org>
AuthorDate: Tue Oct 1 15:06:11 2019 +0100

    Add logging
---
 java/org/apache/tomcat/util/compat/Jre7Compat.java | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/tomcat/util/compat/Jre7Compat.java b/java/org/apache/tomcat/util/compat/Jre7Compat.java
index 11c41f7..f47c3af 100644
--- a/java/org/apache/tomcat/util/compat/Jre7Compat.java
+++ b/java/org/apache/tomcat/util/compat/Jre7Compat.java
@@ -30,8 +30,15 @@ import java.util.Locale;
 import java.util.concurrent.Executor;
 import java.util.zip.GZIPOutputStream;
 
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
+import org.apache.tomcat.util.res.StringManager;
+
 class Jre7Compat extends JreCompat {
 
+    private static final Log log = LogFactory.getLog(Jre7Compat.class);
+    private static final StringManager sm = StringManager.getManager(Jre7Compat.class);
+
     private static final int RUNTIME_MAJOR_VERSION = 7;
 
     private static final Method forLanguageTagMethod;
@@ -84,8 +91,10 @@ class Jre7Compat extends JreCompat {
             m14 = Statement.class.getMethod("isCloseOnCompletion");
         } catch (SecurityException e) {
             // Should never happen
+            log.error(sm.getString("jre7Compat.unexpected"), e);
         } catch (NoSuchMethodException e) {
-            // Expected on Java < 7
+            // Must be pre-Java 7
+            log.debug(sm.getString("jre7Compat.javaPre7"), e);
         }
         forLanguageTagMethod = m1;
         gzipOutputStreamConstructor = c;


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message