How can i access the logger from a groovy script?
Currently we use stdout (System.out.println("a log message")) in our groovy scripttasks. We want to move away from stdout logging and would like to use a the logger available in javascript scripttaks for example.
Or even better: can we define our own logfile and write to this?
Solved! Go to Solution.
ok found out how to do it. Add the following to your script:
import org.slf4j.*;
Logger logger = LoggerFactory.getLogger("org.some.thing");
logger.debug("slf4j - logger.debug -- Hello world.");
ok found out how to do it. Add the following to your script:
import org.slf4j.*;
Logger logger = LoggerFactory.getLogger("org.some.thing");
logger.debug("slf4j - logger.debug -- Hello world.");
Hi @klaasdeboer ,
Thanks for posting this solution - will be helpful to other users.
Ask for and offer help to other Alfresco Process Services and Activiti Users and members of the Alfresco team.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.