[ 
https://issues.apache.org/jira/browse/SPARK-21711?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16124529#comment-16124529
 ] 

Mahesh Ambule commented on SPARK-21711:
---------------------------------------

Sean Owen: I figured out a way to configure the log4j  configuration for 
spark-client/launcher.  The $SPARK_SUBMIT_OPTS environment variable can be set 
to include log4j configuration. $SPARK_SUBMIT_OPTS gets appended to command 
line options when "org.apache.spark.deploy.SparkSubmit" is invoked.

export SPARK_SUBMIT_OPTS="$SPARK_SUBMIT_OPTS 
-Dlog4j.configuration=/home/mahesh/log4j.config"

Link for the relevant code:
https://github.com/apache/spark/blob/branch-2.1/launcher/src/main/java/org/apache/spark/launcher/SparkSubmitCommandBuilder.java#L242

> spark-submit command should accept log4j configuration parameters for spark 
> client logging.
> -------------------------------------------------------------------------------------------
>
>                 Key: SPARK-21711
>                 URL: https://issues.apache.org/jira/browse/SPARK-21711
>             Project: Spark
>          Issue Type: Improvement
>          Components: Spark Submit
>    Affects Versions: 1.6.0, 2.1.0
>            Reporter: Mahesh Ambule
>            Priority: Minor
>         Attachments: spark-submit client logs.txt
>
>
> Currently, log4j properties can be specified in spark 'conf' directory in 
> log4j.properties file.
> The spark-submit command can override these log4j properties for driver and 
> executors. 
> But it can not override these log4j properties for *spark client * 
> application.
> The user should be able to pass log4j properties for spark client using the 
> spark-submit command.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to