I would like to have separate log files from workers, masters and jobs(executors, submits, don't know how call it). I tried configuration in log4j.properties
like
log4j.appender.myAppender.File=/some/log/dir/${log4j.myAppender.FileName}
and than passing log4j.myAppender.FileName
in SPARK_MASTER_OPTS
, SPARK_WORKER_OPTS
, spark.executor.extraJavaOptions
and spark.driver.extraJavaOptions
.
It works perfectly well with workers and masters but fails with executors and drivers. Here is example of how I use these:
./spark-submit ... --conf "\"spark.executor.extraJavaOptions=log4j.myAppender.FileName=myFileName some.other.option=foo\"" ...
I also tried putting log4j.myAppender.FileName
with some default value in spark-defaults.conf
but it doesn't work neither.
Is there some way to achieve what I want?