/rollbar-logback

Logback appender for integration with the Rollbar service.

Primary LanguageJavaMIT LicenseMIT

Rollbar Logback

Build Status

This is a fork of the ahaid's Rollbar Logback Appender created on July 27th, 2014 for use with the error aggregation service Rollbar. You will need a Rollbar account: sign up for an account here.

Logback

<appender name="ROLLBAR" class="com.tapstream.rollbar.logback.RollbarAppender">
    <apiKey>[YOUR APIKEY HERE]</apiKey>
    <environment>local</environment>
</appender>

<root level="debug">
	<appender-ref ref="ROLLBAR"/>
</root>

Appender parameters:

  • url: The Rollbar API url. Default: https://api.rollbar.com/api/1/item/
  • apiKey: The rollbar API key. Mandatory.
  • environment: Environment. i.e. production, test, development. Mandatory.

Custom MDC parameters

Any MDC values with keys that do not start with RollbarFilter.REQUEST_PREFIX will be added as custom parameters to the Rollbar item request.

Servlet Filter

Located at com.tapstream.rollbar.logback.RollbarFilter is a J2EE servlet filter that will populate the request portion of the Rollbar item from a ServletRequest. The filter will include:

  • Remote IP address
  • User agent
  • Method
  • URL
  • Query String
  • Headers
  • Parameters

Acknowledgements

This library has been inspired by: