Is there a way to write into the server log from a groovlet script? I've tried the following to no avail:
- Create a class with
@Log4j
annotation within the groovlet (@Log4j
works fine in the rest of the project)
@Log4j('LOGGER')
class Log {
static Logger getLogger() {
LOGGER
}
}
- Use
ServerContext
instance implicit variableapplication
:
application.log('Hello world')
Any ideas welcome, thanks.