Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Airbrake.io notifier for Play 2.0
Branch: master
Pull request Compare This branch is 16 commits behind teamon:master.

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
src/main/scala/play/airbrake
.gitignore
LICENSE
README.md
build.sbt

README.md

Airbrake.io notifier for Play 2.0

Instalation

Add play-airbrake to your project/Build.scala file

val appDependencies = Seq(
  "eu.teamon" %% "play-airbrake" % "0.1.0"
)

val main = PlayProject(appName, appVersion, appDependencies, mainLang = SCALA).settings(
  resolvers += "teamon.eu repo" at "http://repo.teamon.eu"
)

Your app/Global.scala should look like this

import play.api._
import play.api.mvc._
import play.airbrake.Airbrake

object Global extends GlobalSettings {

  override def onError(request: RequestHeader, ex: Throwable) = {
    Airbrake.notify(request, ex)
    super.onError(request, ex)
  }

}

Configuration

Key Description
airbrake.apiKey String, required airbrake project api key
airbrake.ssl Boolean, optional, defaults to false set to true if you have airbrake plan with SSL support
airbrake.enabled Boolean, optional, default to Play.isProd optionally enable/disable notifications for different environment
Something went wrong with that request. Please try again.