Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.8-beta-3
-
None
-
None
Description
If I have a class with it and use the 'log' variable in a static method I get a compilation error.
Log4jTest.groovy:
import groovy.util.logging.Log4j
@Log4j
class TestLog4j {
public static void main(String[] args)
{ log.info "Hello World" }}
Error Message:
Apparent variable 'log' was found in a static scope but doesn't refer to a local variable, static field or class. Possible causes:
You attempted to reference a variable in the binding or an instance variable from a static context.
You misspelled a classname or statically imported field. Please check the spelling.
You attempted to use a method 'log' but left out brackets in a place not allowed by the grammar.