Airbrake Client for Grails
Groovy Gosu
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 4 commits ahead, 1 commit behind plecong:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.settings
grails-app
scripts
src/groovy/grails/plugins/airbrake
web-app/WEB-INF
.classpath
.gitignore
.project
AirbrakeGrailsPlugin.groovy
README.md
application.properties
plugin.xml

README.md

Airbrake Plugin for Grails

This is the notifier gem for integrating apps with Airbrake.

When an uncaught exception occurs, Airbrake will POST the relevant data to the Airbrake server specified in your environment.

Installation

Currently the plugin doesn't reside in the Grails plugin repository. Installation instructions to follow.

Configuration

Once the plugin is installed, you only need to add a few lines of code into the Config.groovy file, all within the log4j map:

log4j = {
    appenders {
      console name:'stdout', layout:pattern(conversionPattern: '%c %m%n')

// -------> Add the Airbrake appender
      appender name: 'airbrake', new grails.plugins.airbrake.AirbrakeAppender(
          api_key: 'API_KEY', // Place your API key here
          env: 'dev'
      )
// <-------
    }

    error  'org.codehaus.groovy.grails.web.servlet',  //  controllers
           'org.codehaus.groovy.grails.web.pages', //  GSP
           'org.codehaus.groovy.grails.web.sitemesh', //  layouts
           'org.codehaus.groovy.grails.web.mapping.filter', // URL mapping
           'org.codehaus.groovy.grails.web.mapping', // URL mapping
           'org.codehaus.groovy.grails.commons', // core / classloading
           'org.codehaus.groovy.grails.plugins', // plugins
           'org.codehaus.groovy.grails.orm.hibernate', // hibernate integration
           'org.springframework',
           'org.hibernate',
           'net.sf.ehcache.hibernate'

    warn   'org.mortbay.log', 'org.apache'

    root {
// -------> Add the 'airbrake' appender to the root debug level logging
      debug 'stdout', 'airbrake'
// <-------
    }
}