-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(log4j):add rollbar support #359
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
log4j.appender.ROLLBAR=com.nextdoor.rollbar.RollbarLog4jAppender | ||
log4j.appender.ROLLBAR.AccessToken=${ROLLBAR_ACCESS_TOKEN} | ||
log4j.appender.ROLLBAR.Environment=${ROLLBAR_ENV:-production} | ||
log4j.appender.ROLLBAR.layout=org.apache.log4j.PatternLayout | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe let's start with error? |
||
log4j.appender.ROLLBAR.Threshold=${ROLLBAR_ENV:-WARN} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ROLLBAR_ENV? Warn should be error |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ | |
# | ||
|
||
# Set everything to be logged to the console | ||
log4j.rootLogger=INFO,console | ||
log4j.rootLogger=INFO,console,ROLLBAR | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does this work if rollbar is not in this file? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes |
||
log4j.appender.console=org.apache.log4j.ConsoleAppender | ||
log4j.appender.console.target=System.err | ||
log4j.appender.console.layout=org.apache.log4j.PatternLayout | ||
|
@@ -38,4 +38,4 @@ log4j.logger.org.apache.hadoop.hive.metastore.RetryingHMSHandler=FATAL | |
log4j.logger.org.apache.hadoop.hive.ql.exec.FunctionRegistry=ERROR | ||
|
||
log4j.logger.com.yotpo.metorikku=INFO | ||
log4j.logger.org.apache.hudi=INFO | ||
log4j.logger.org.apache.hudi=INFO |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think in order to use this feature
https://docs.rollbar.com/docs/java#synchronous-option
We need to create a custom appender, copy paste from here (https://github.com/zendesk/rollbar-log4j/blob/master/src/main/java/com/zendesk/rollbar/RollbarLog4jAppender.java)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or try fixing with a shutdown hook?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the problem is they haven't implemented the close function there...