
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-19-2019 05: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?
- Labels:
-
Alfresco Process Services

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-11-2020 03: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.");

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-11-2020 03: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.");
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-11-2020 08:52 AM
Hi @klaasdeboer ,
Thanks for posting this solution - will be helpful to other users.
Problem solved? Click Accept as Solution!
