I'm writing a Scala / Spark program following this example. My tools are IntelliJ and sbt. (I'm not using the scala spark shell.) I'm using scala-logging with logback-classic and I need to reduce the logging from Spark or direct the spark logging to a different .log file.
I've tried calling sc.setLogLevel("WARN")
in my code where sc
is the SparkContext
but it has no effect.
To make matters worse the Spark log output comes from several different packages (org.apache.spark, o.a.h.m.lib, o.a.h.s.a, etc.) I hope there is a better way than defining an appender for each package.
How do I turn off Spark logging, or better yet redirect logging from Spark to a different file than the logging calls from my code?