Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-43782

Support log level configuration with static Spark conf

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.5.0
    • 3.5.0
    • Spark Core
    • None

    Description

      Today users are using sc.setLogLevel to configure the current log level using SparkContext accessible from within the SparkSession. It is a convenient alternative to directly depending on the Log4j mechanism like statically changing the log4j.xml or dynamically invoke the Log4j API.

      It would be great to allow the configuration of the log level using a static Spark conf that has the same kind of simplicity, which comes in handy when we don't want to manually change the log4j.xml. This is particularly helpful in the Spark Connect scenario where there’s no way for the client to call setLogLevel because SparkContext is not yet supported in its API, and when it connects to a platform where it can't easily change the Log4j config file.
      ./bin/pyspark --conf spark.log.level ERROR

      Attachments

        Activity

          People

            jwang0306 Yan-Lin (Jared) Wang
            jwang0306 Yan-Lin (Jared) Wang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: