How to log in a Groovy Script

Is there a simple way to use logging in a Groovy Script?

My naiv attempt looks like this (as Camunda uses SLF4J and following this: Inject Logger into Script engine groovy - #4 by StephenOTT):

import org.slf4j.*

Logger logger = LoggerFactory.getLogger("MyScriptLogger");
logger.info("Hello World");

But this gives me this:

17-Aug-2020 11:22:44.612 SEVERE [http-nio-8080-exec-17] org.camunda.commons.logging.BaseLogger.logError ENGINE-16004 Exception while closing command context: Unable to evaluate script: java.lang.IllegalArgumentException: UTILS-02001 Parameter 'parameter' is null
	org.camunda.bpm.engine.ScriptEvaluationException: Unable to evaluate script: java.lang.IllegalArgumentException: UTILS-02001 Parameter 'parameter' is null
		at org.camunda.bpm.engine.impl.scripting.CompiledExecutableScript.evaluate(CompiledExecutableScript.java:61)
		at org.camunda.bpm.engine.impl.scripting.SourceExecutableScript.evaluate(SourceExecutableScript.java:61)
		at org.camunda.bpm.engine.impl.scripting.ResourceExecutableScript.evaluate(ResourceExecutableScript.java:46)
		at org.camunda.bpm.engine.impl.scripting.ExecutableScript.execute(ExecutableScript.java:63)
		at org.camunda.bpm.engine.impl.scripting.env.ScriptingEnvironment.execute(ScriptingEnvironment.java:101)
		at org.camunda.bpm.engine.impl.scripting.env.ScriptingEnvironment.execute(ScriptingEnvironment.java:87)
		at org.camunda.bpm.engine.impl.delegate.ScriptInvocation.invoke(ScriptInvocation.java:47)
		at org.camunda.bpm.engine.impl.delegate.DelegateInvocation.proceed(DelegateInvocation.java:58)
		at org.camunda.bpm.engine.impl.delegate.DefaultDelegateInterceptor.handleInvocationInContext(DefaultDelegateInterceptor.java:92)

My Bad - there was another problem in the Script.
So I just keep this as a future reference. The above Script works as expected and has the following Log Entry in the Camunda Log:

17-Aug-2020 12:01:45.623 INFO [http-nio-8080-exec-32] org.slf4j.Logger$info.call Hello World