1.1 --- a/launcher/src/main/java/org/apidesign/bck2brwsr/launcher/JSLauncher.java Tue Jan 22 19:16:38 2013 +0100
1.2 +++ b/launcher/src/main/java/org/apidesign/bck2brwsr/launcher/JSLauncher.java Mon Jan 28 12:18:24 2013 +0100
1.3 @@ -23,6 +23,7 @@
1.4 import java.util.Enumeration;
1.5 import java.util.LinkedHashSet;
1.6 import java.util.Set;
1.7 +import java.util.logging.Level;
1.8 import java.util.logging.Logger;
1.9 import javax.script.Invocable;
1.10 import javax.script.ScriptEngine;
1.11 @@ -46,10 +47,15 @@
1.12 loaders.add(clazz.getClassLoader());
1.13 MethodInvocation mi = new MethodInvocation(clazz.getName(), method, html);
1.14 try {
1.15 - mi.result(code.invokeMethod(
1.16 + long time = System.currentTimeMillis();
1.17 + LOG.log(Level.FINE, "Invoking {0}.{1}", new Object[]{mi.className, mi.methodName});
1.18 + String res = code.invokeMethod(
1.19 console,
1.20 "invoke__Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2",
1.21 - mi.className, mi.methodName).toString(), null);
1.22 + mi.className, mi.methodName).toString();
1.23 + time = System.currentTimeMillis() - time;
1.24 + LOG.log(Level.FINE, "Resut of {0}.{1} = {2} in {3} ms", new Object[]{mi.className, mi.methodName, res, time});
1.25 + mi.result(res, null);
1.26 } catch (ScriptException | NoSuchMethodException ex) {
1.27 mi.result(null, ex);
1.28 }