I am looking for a solution to be able to log additional data when executing code on Apache Spark Nodes that could help investigate later some issues that might appear durin
Here is my solution :
I am using SLF4j (with Log4j binding), in my base class of every spark job I have something like this:
import org.slf4j.LoggerFactory
val LOG = LoggerFactory.getLogger(getClass)
Just before the place where I use LOG in distributed functional code, I copy logger reference to a local constant.
val LOG = this.LOG
It worked for me!