Skip to content

Commit

Permalink
Jsr223ScriptEvaluator: initialization log on INFO and only if not null
Browse files Browse the repository at this point in the history
It's better to know when the script engine is also initialized, it's
a single log during startup, now on INFO level.
Also, previously (DEBUG) it was printed also when NOT initialized.
  • Loading branch information
virgo47 committed Sep 24, 2021
1 parent c9089a0 commit 1163204
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,12 @@ public Jsr223ScriptEvaluator(String engineName, PrismContext prismContext,
ScriptEngineManager scriptEngineManager = new ScriptEngineManager();
long initStartMs = System.currentTimeMillis();
scriptEngine = scriptEngineManager.getEngineByName(engineName);
LOGGER.debug("Script engine for '{}' initialized in {} ms.",
engineName, System.currentTimeMillis() - initStartMs);
if (scriptEngine == null) {
LOGGER.warn("The JSR-223 scripting engine for '" + engineName + "' was not found");
return;
}
LOGGER.info("Script engine for '{}' initialized in {} ms.",
engineName, System.currentTimeMillis() - initStartMs);
}

@Override
Expand Down

0 comments on commit 1163204

Please sign in to comment.