You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by su...@apache.org on 2021/10/06 15:46:16 UTC

[groovy] branch danielsun/GROOVY-10281 updated: Add more logging to debug

This is an automated email from the ASF dual-hosted git repository.

sunlan pushed a commit to branch danielsun/GROOVY-10281
in repository https://gitbox.apache.org/repos/asf/groovy.git


The following commit(s) were added to refs/heads/danielsun/GROOVY-10281 by this push:
     new 5c2653a  Add more logging to debug
5c2653a is described below

commit 5c2653a73967d0b9b04dc831dc8080e2bd9d70f6
Author: Daniel Sun <su...@apache.org>
AuthorDate: Wed Oct 6 23:45:56 2021 +0800

    Add more logging to debug
---
 src/main/java/org/codehaus/groovy/vmplugin/VMPluginFactory.java | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/main/java/org/codehaus/groovy/vmplugin/VMPluginFactory.java b/src/main/java/org/codehaus/groovy/vmplugin/VMPluginFactory.java
index 5f534c3..b24b896 100644
--- a/src/main/java/org/codehaus/groovy/vmplugin/VMPluginFactory.java
+++ b/src/main/java/org/codehaus/groovy/vmplugin/VMPluginFactory.java
@@ -59,7 +59,9 @@ public class VMPluginFactory {
         return AccessController.doPrivileged(new PrivilegedAction<VMPlugin>() {
             @Override
             public VMPlugin run() {
+                System.out.println("Trying to create plugin...");
                 final BigDecimal specVer = new BigDecimal(System.getProperty("java.specification.version"));
+                System.out.println("specVer: " + specVer + ", PLUGIN_MAP: " + PLUGIN_MAP);
                 ClassLoader loader = VMPluginFactory.class.getClassLoader();
                 for (Map.Entry<BigDecimal, String> entry : PLUGIN_MAP.entrySet()) {
                     if (isAtLeast(specVer, entry.getKey())) {
@@ -71,12 +73,12 @@ public class VMPluginFactory {
                                 LOGGER.fine("Trying to create VM plugin `" + pluginName + "`, but failed:\n" + DefaultGroovyMethods.asString(t)
                                 );
                             }
-
+                            System.out.println("Failed to load plugin: " + pluginName + ", msg: " + t.getMessage());
                             return null;
                         }
                     }
                 }
-
+                System.out.println("Failed to find plugin");
                 return null;
             }
         });