Skip to content

Deliverydotcom/rollbar-log4j2-java

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rollbar Logback

Build Status

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.

Logback

<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:

Providing the API key externally

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).

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:

About

Logback appender for integration with the Rollbar service.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%