Hello Groovy Developers and Community,

I am currently working with groovy.util.GroovyScriptEngine and I have
encountered a specific requirement where I need to redirect the output of
the script engine to a custom Writer, separate from the default
stdout/stderr, without affecting the rest of the JVM. This functionality is
somewhat similar to what javax.script.ScriptContext offers with methods to
set a custom writer.I am aware of
org.codehaus.groovy.jsr223.GroovyScriptEngineImpl, but it seems limited for
my use case. I am looking for a way to achieve this with
groovy.util.GroovyScriptEngine.Could you please guide me on how to redirect
the output effectively? Is there an existing feature in Groovy that I might
have missed, or would this be a case for a feature request?Any guidance or
suggestions would be greatly appreciated.Thank you for your time and
assistance.

Best regards,
* Anadi Kashyap *
* Software Engineer *
------------------------------
[image: 314e Corporation] <https://www.314e.com/>
* E: * anadi.kash...@314ecorp.com
* T: * +1.510.371.6736
* M: * +91.891.016.1263
Connect with me on LinkedIn <https://www.linkedin.com/in/anadi-kashyap/>

Reply via email to