Skip to content

From version 1.6.0 to 1.7.5, Rollbar fails to work correctly with a typical configuration for log4j2.

Notifications You must be signed in to change notification settings

greening/rollbar-1.7.4-bug

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bug in Rollbar 1.6.0 through 1.7.5

From version 1.6.0 to 1.7.5, Rollbar fails to log through log4j2 with this (typical) configuration.

Install and demonstrate bug

To see this bug, first create file secret.properties, and add a Rollbar token thus:

rollbar.accessToken=<secret-rollbar-token>

Then run these commands:

mvn clean install
java -cp 'target/rollbar-1.0-SNAPSHOT.jar:target/lib/*' org.greening.Main

You can see that it does not log "Donald Trump was elected US President" as an error to Rollbar, but log4j2 logs correctly logs "Donald Trump was elected US President" as an error to console and rolling file. The failure is present from Rollbar 1.6.0 onward.

See Rollbar 1.5.2 succeed

Change the version of Rollbar 1.5.2 in the pom.xml <rollbar.version>1.5.2</rollbar.version>. Then run these commands:

mvn clean install
java -cp 'target/rollbar-1.0-SNAPSHOT.jar:target/lib/*' org.greening.Main

It now works.

Running with uno-jar

We use uno-jar fat jar system, and so at first I thought it might be that. You can also see Rollbar fail with unojar, by running this command, but uno-jar is really not necessary to see this bug.

java -jar target/rollbar-1.0-SNAPSHOT-unojar.jar

About

From version 1.6.0 to 1.7.5, Rollbar fails to work correctly with a typical configuration for log4j2.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages