You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Chia-Ping Tsai (Jira)" <ji...@apache.org> on 2021/12/26 16:48:00 UTC

[jira] [Created] (SPARK-37746) log4j2-defaults.properties is not working since log4j 2 is always initialized by default

Chia-Ping Tsai created SPARK-37746:
--------------------------------------

             Summary: log4j2-defaults.properties is not working since log4j 2 is always initialized by default
                 Key: SPARK-37746
                 URL: https://issues.apache.org/jira/browse/SPARK-37746
             Project: Spark
          Issue Type: Bug
          Components: Spark Core
    Affects Versions: 3.3.0
            Reporter: Chia-Ping Tsai


the code used to check initialization is shown below.

      val log4j2Initialized = !LogManager.getRootLogger
        .asInstanceOf[org.apache.logging.log4j.core.Logger].getAppenders.isEmpty

That works for log4j. However, log4j2 provides a default configuration so there is always a appender (ConsoleAppender) with error level.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

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