I've upgraded a Grails 1.0.3 app to Grails 1.1.1. I've upgraded the log4j configuration in Config.groovy to conform to the new DSL. However, after defining a ConsoleAppender with a PatternLayout, the application won't start, and instead throws a MissingMethodException with the message:
groovy.lang.MissingMethodException: No signature of method: \
groovy.util.ConfigSlurper$_parse_closure5.pattern() is applicable \
for argument types: (java.util.LinkedHashMap) \
values: [[conversionPattern:%d{ISO8601} [%10.10t] [%18.18c] [%5p] - %m%n]]
(I broke the above message into multiple lines for readability).
My configuration is:
environments {
development {
log4j {
appenders {
console name: 'myAppender',
layout: pattern(conversionPattern: '%d{ISO8601} [%10.10t] [%18.18c] [%5p] - %m%n')
...
}
root {
error 'myAppender'
additivity = true
}
error 'org.codehaus.groovy.grails.plugins',
'org.codehaus.groovy.grails.orm.hibernate',
...
}
...
}
I've tried changing the pattern, adding parentheses for the console() function, but with no success. What's causing this Exception?