I'm encountering this error:
groovy.lang.MissingPropertyException: No such property: log for class: org.utils.MyClass
Here's the content of the class:
package org.utils
class MyClass {
int organizationCount = 0
public int getOrganizationCount(){
log.debug "There are ${organizationCount} organization(s) found."
return organizationCount
}
}
Do i need to add an import statement? What do i need to add? Note that the class is located in src/groovy/org/utils. I know that the 'log' variable is accessible in controllers, services, etc. Not sure in 'src' classes.
Thanks.