Pass system property to spark-submit and read file from classpath or custom path
I have recently found a way to use logback instead of log4j in Apache Spark (both for local use and spark-submit ). However, there is last piece missing. The issue is that Spark tries very hard not to see logback.xml settings in its classpath. I have already found a way to load it during local execution: What I have so far Basically, checking for System property logback.configurationFile , but loading logback.xml from my /src/main/resources/ just in case: // the same as default: https://logback.qos.ch/manual/configuration.html private val LogbackLocation = Option(System.getProperty("logback