Resolved. Used passing parameters in sparkConf instead of passing to spark-submit command : (still dont know why passing to spark-submit command did not work)
sparkConf.set("spark.executor.extraJavaOptions", "-XX:+UseG1GC -Dlog4j.configuration=file:log4j_RequestLogExecutor.properties ") On Tue, May 24, 2016 at 10:24 PM, chandan prakash <chandanbaran...@gmail.com > wrote: > Any suggestion? > > On Mon, May 23, 2016 at 5:18 PM, chandan prakash < > chandanbaran...@gmail.com> wrote: > >> Hi, >> I am able to do logging for driver but not for executor. >> >> I am running spark streaming under mesos. >> Want to do log4j logging separately for driver and executor. >> >> Used the below option in spark-submit command : >> >> --driver-java-options >> "-Dlog4j.configuration=file:/usr/local/spark-1.5.1-bin-hadoop2.6/conf/log4j_RequestLogDriver.properties" >> --conf "spark.executor.extraJavaOptions=-Dlog4j.configuration=file: >> /usr/local/spark-1.5.1-bin-hadoop2.6/conf/log4j_RequestLogExecutor.properties >> " >> >> Logging for driver at path mentioned as in >> log4j_RequestLogDriver.properties(/tmp/requestLogDriver.log) is >> happening fine. >> But for executor, there is no logging happening (shud be at >> /tmp/requestLogExecutor.log as mentioned in >> log4j_RequestLogExecutor.properties >> on executor machines) >> >> *Any suggestions how to get logging enabled for executor ?* >> >> TIA, >> Chandan >> >> -- >> Chandan Prakash >> >> > > > -- > Chandan Prakash > > -- Chandan Prakash