I have this code in my Config.groovy:
appenders {
console name: "stdout", layout: pattern(conversionPattern: "%c{2} %m%n")
}
root {
warn 'stdout'
}
Now I want to log messages with DEBUG level from a specific controller (or specific package). How can I achieve that?
If your controller name is
ExampleControllerin thecom.examplepackage, add this to the log4j closure in yourConfig.groovy:See the Grails user guide for more logging examples.