Skip to content

Commit

Permalink
[jsscripting] Extend debug logging
Browse files Browse the repository at this point in the history
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
  • Loading branch information
florian-h05 committed Dec 29, 2022
1 parent a86e32a commit ba5fb0e
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public class OpenhabGraalJSScriptEngine
private static final String REQUIRE_WRAPPER_NAME = "__wraprequire__";
/** Final CommonJS search path for our library */
private static final Path NODE_DIR = Paths.get("node_modules");
/** Shared Polyglot {@link Engine} across all instances of {@link OpenhabGraalJSScriptEngine} for performance and memory improvements */
/** Shared Polyglot {@link Engine} across all instances of {@link OpenhabGraalJSScriptEngine} */
private static final Engine ENGINE = Engine.newBuilder().allowExperimentalOptions(true)
.option("engine.WarnInterpreterOnly", "false").build();
/** Provides unlimited host access as well as custom translations from JS to Java Objects */
Expand Down Expand Up @@ -229,7 +229,9 @@ protected void beforeInvocation() {
initialized = true;

try {
LOGGER.debug("Evaluating global script...");
eval(globalScript);
LOGGER.debug("Successfully initialized GraalJS script engine.");
} catch (ScriptException e) {
LOGGER.error("Could not inject global script", e);
}
Expand Down

0 comments on commit ba5fb0e

Please sign in to comment.