12-19-2019 02:43 AM
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?
02-11-2020 12:47 AM
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.");
02-11-2020 12:47 AM
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.");
02-11-2020 05:52 AM
Hi @klaasdeboer ,
Thanks for posting this solution - will be helpful to other users.
Explore our Alfresco products with the links below. Use labels to filter content by product module.