title: PySpark logging from the executor
body: <p>What is the correct way to access the log4j logger of Spark using pyspark on an executor?</p>
  
  <p>It's easy to do so in the driver but I cannot seem to understand how to access the logging functionalities on the executor so that I can log locally and let YARN collect the local logs.</p>
  
  <p>Is there any way to access the local logger?</p>
  
  <p>The standard logging procedure is not enough because I cannot access the spark context from the executor.</p>