how can i use log4j in grails app开发者_如何学Golication?
Look at the Logging section of the manual. log4j is built in and has a basic configuration out of the box.
You could use log4j right from the box, for example:
log.debug "The value of foo is $foo"
Configuration of logging in last version
If you are into unit testing be sure to check mockLogging method in Testing section.
精彩评论