This is a fork of the Tapstream's Rollbar Logback Appender created on June 10th, 2016 for use with the error aggregation service Rollbar. You will need a Rollbar account: sign up for an account here.
<Rollbar name="rollbar" apikey="[YOUR APIKEY HERE]" environment="dev" system="laundry">
<apiKey></apiKey>
<environment>local</environment>
</Rollbar>
<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. The API key is mandatory and has to be set either here or via an environment variable.
- environment: Environment. i.e. production, test, development. Mandatory.
You can choose to set the API key by using an environment variable. This way your API key stays out of your code and your source control repository.
Create the environment variable ROLLBAR_LOGBACK_API_KEY
and set its value to your API key. This value will
override the value set in logback.xml
(if set).
Any MDC values with keys that do not start with RollbarFilter.REQUEST_PREFIX
will be added as custom parameters to
the Rollbar item request.
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
This library has been inspired by: