Skip to content

Instantly share code, notes, and snippets.

@lcuevastodoit
Forked from eliotsykes/DebugFilters.groovy
Created October 19, 2022 21:44
Show Gist options
  • Save lcuevastodoit/2b4f2c04b64ada0a138655069ef8c307 to your computer and use it in GitHub Desktop.
Save lcuevastodoit/2b4f2c04b64ada0a138655069ef8c307 to your computer and use it in GitHub Desktop.
Grails Debug Filter - log requests
// Put me in grails-app/conf/DebugFilters.groovy
class DebugFilters {
def filters = {
all(controller:'*', action:'*') {
before = {
log.error "${request.method}: $request.forwardURI $request.params"
}
after = { Map model ->
}
afterView = { Exception e ->
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment