daniel Thu, 05/16/2013 - 10:55am
This situation is if you are running grails in the console, and want to connect to it with your ide (eclipse, netbeans, intellij, etc)
You have two options for starting grails, either
or the option from rlovtangen who uses a similar config, but allows the command line app to run and connect as needed with the debugger, instead of requiring a debugger connection before proceeding.
Then just connect as usual with your debugging env, example here
daniel Tue, 05/14/2013 - 9:40pm
This took me a few tries to get right, so posting here to remember and clarify:
If you are creating objects that are not Grails "Artifacts" (controllers, services, etc) and you instantiate your log in the class like so:
private static final log = org.apache.commons.logging.LogFactory.getLog(this)
then in the log4j config section of the Config.groovy, you can set the log level like this:
If you are using the injected "log" var in a Grails Artifact, you will access it like this:
Note the "grails.app.services" preceding the package.
Lifted from the Grails docs:
The standard artifact names used in the logging configuration are:
conf - For anything under grails-app/conf such as BootStrap.groovy (but excluding filters)
filters - For filters
taglib - For tag libraries
services - For service classes
controllers - For controllers
domain - For domain entities
daniel Tue, 05/14/2013 - 9:20pm
I received this error message when working behind iis7 on grails:
The request filtering module is configured to deny a request that contains a double escape sequence.
The value I sent via the url looked like this: "This+little+value". Note the pluses added by the the org.codehaus.groovy.grails.plugins.codecs .URLCodec encoder.
Some google-fu turned up this link from stackoverflow: how-do-i-encode-uri-parameter-values
The URLCodec encoder seems to be suboptimal in an iis environment, so I switched to UriUtils as suggested by the stackoverflow post, see the javadoc
This ended up being what I needed:
return UriUtils.encodePathSegment(myVarWithASpaceInIt, 'UTF-8')