GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - elost/airbrake-java: The official Java library for http://airbrake.io

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

106 Commits
106 Commits

Folders and files

NameName
Last commit message
Last commit date
maven2
maven2
 
 
src
src
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
pom.xml
pom.xml
 
 

Repository files navigation

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.8</version>
		</dependency>
	</dependencies>
</project>

Without Maven

you need to add these libraries to your classpath

  • airbrake-java-2.2.8
  • log4j-1.2.14

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=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
#log4j.appender.airbrake.url=http://api.airbrake.io/notifier_api/v2/notices

or in XML format:

<appender name="AIRBRAKE" class="airbrake.AirbrakeAppender">
	<param name="api_key" value="YOUR_AIRBRAKE_API_KEY"/>
	<param name="env" value="test"/>
	<param name="enabled" value="true"/>
<!-- <param name="url" value="http://api.airbrake.io/notifier_api/v2/notices" /> -->
</appender>

<root>
	<appender-ref ref="AIRBRAKE"/>
</root>

Directly

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

if you need to specifiy a different url to send notice you can create new notifier with this url:

try {
	doSomethingThatThrowAnException();
}
catch(Throwable t) {
	AirbrakeNotice notice = new AirbrakeNoticeBuilder(YOUR_AIRBRAKE_API_KEY, t, "env").newNotice();
	AirbrakeNotifier notifier = new AirbrakeNotifier("http://api.airbrake.io/notifier_api/v2/notices");
	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.

About

The official Java library for http://airbrake.io

Resources

Readme
Apache-2.0 license
Activity

Stars

0 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.