Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
The official Java library for http://airbrake.io
Java

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
maven2/io/airbrake/airbrake-java
src
.gitignore
LICENSE
README.md
TODO
pom.xml

README.md

Airbrake Java

This is the notifier jar for integrating apps with Airbrake with Java Applications. Sign up for a Free or Paid account.

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

The easy way to use airbrake is configuriong log4j appender. Otherwise if you don't use log4j you can use airbrake notifier directly with a very simple API.

Setting up with Maven

<project>
    <dependencies>
        <dependency>
        <groupId>io.airbrake</groupId>
        <artifactId>airbrake-java</artifactId>
        <version>2.2.0</version>
        </dependency>
    </dependencies>
</project>

Without Maven

you need to add these libraries to your classpath

Log4j

log4j.rootLogger=INFO, stdout, airbrake

log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=[%d,%p] [%c{1}.%M:%L] %m%n

log4j.appender.airbrake=code.lucamarrocco.airbrake.AirbrakeAppender 
log4j.appender.airbrake.api_key=YOUR_AIRBRAKE_API_KEY
#log4j.appender.airbrake.env=development
#log4j.appender.airbrake.env=production
log4j.appender.airbrake.env=test
log4j.appender.airbrake.enabled=true

Directly

try {
    doSomethingThatThrowAnException();
}
catch(Throwable t) {
    AirbrakeNotice notice = new AirbrakeNoticeBuilder(YOUR_AIRBRAKE_API_KEY, t, "env").newNotice();
    AirbrakeNotifier notifier = new AirbrakeNotifier();
    notifier.notify(notice);
}

Support

For help with using Airbrake and this notifier visit our support site.

For SSL verification see the Resources.

For any issues, please post then in our Issues.

Something went wrong with that request. Please try again.