Skip to content

Commit

Permalink
feat(log4j):add rollbar support
Browse files Browse the repository at this point in the history
  • Loading branch information
liebstein committed Aug 11, 2020
1 parent eed02a5 commit 64582e5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
3 changes: 2 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ libraryDependencies ++= Seq(
"org.apache.avro" % "avro" % "1.8.2" % "provided",
"org.apache.hive" % "hive-jdbc" % "2.3.3" % "provided" excludeAll(excludeNetty, excludeNettyAll, excludeLog4j, excludeParquet),
"org.apache.hadoop" % "hadoop-aws" % "2.7.3" % "provided",
"com.amazon.deequ" % "deequ" % "1.0.4" excludeAll(excludeSpark)
"com.amazon.deequ" % "deequ" % "1.0.4" excludeAll(excludeSpark),
"com.nextdoor.rollbar" % "rollbar-log4j" % "1.0.2"
)

// Temporary fix for https://github.com/databricks/spark-redshift/issues/315#issuecomment-285294306
Expand Down
11 changes: 9 additions & 2 deletions src/main/resources/log4j.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#

# Set everything to be logged to the console
log4j.rootLogger=INFO,console
log4j.rootLogger=INFO,console,ROLLBAR
log4j.appender.console=org.apache.log4j.ConsoleAppender
log4j.appender.console.target=System.err
log4j.appender.console.layout=org.apache.log4j.PatternLayout
Expand All @@ -38,4 +38,11 @@ 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

# Rollbar support
log4j.appender.ROLLBAR=com.nextdoor.rollbar.RollbarLog4jAppender
log4j.appender.ROLLBAR.AccessToken=b831f32253a645a18fabad94c266508a
log4j.appender.ROLLBAR.Environment=production
log4j.appender.ROLLBAR.layout=org.apache.log4j.PatternLayout
log4j.appender.ROLLBAR.Threshold=ERROR
2 changes: 1 addition & 1 deletion version.sbt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version in ThisBuild := "0.0.92"
version in ThisBuild := "0.0.93-SNAPSHOT"

0 comments on commit 64582e5

Please sign in to comment.