@@ -90,44 +90,50 @@ public class Log4J2LoggingSystem extends AbstractLoggingSystem {
9090
9191 private static final String OPTIONAL_PREFIX = "optional:" ;
9292
93- private static final String LOG4J_BRIDGE_HANDLER = "org.apache.logging.log4j.jul.Log4jBridgeHandler" ;
93+ /**
94+ * JUL handler that routes messages to the Log4j API (optional dependency).
95+ */
96+ static final String LOG4J_BRIDGE_HANDLER = "org.apache.logging.log4j.jul.Log4jBridgeHandler" ;
9497
95- private static final String LOG4J_LOG_MANAGER = "org.apache.logging.log4j.jul.LogManager" ;
98+ /**
99+ * JUL LogManager that routes messages to the Log4j API as the backend.
100+ */
101+ static final String LOG4J_LOG_MANAGER = "org.apache.logging.log4j.jul.LogManager" ;
96102
97103 /**
98104 * JSON tree parser used by Log4j 2 (optional dependency).
99105 */
100- private static final String JSON_TREE_PARSER_V2 = "com.fasterxml.jackson.databind.ObjectMapper" ;
106+ static final String JSON_TREE_PARSER_V2 = "com.fasterxml.jackson.databind.ObjectMapper" ;
101107
102108 /**
103109 * JSON tree parser embedded in Log4j 3.
104110 */
105- private static final String JSON_TREE_PARSER_V3 = "org.apache.logging.log4j.kit.json.JsonReader" ;
111+ static final String JSON_TREE_PARSER_V3 = "org.apache.logging.log4j.kit.json.JsonReader" ;
106112
107113 /**
108114 * Configuration factory for properties files (Log4j 2).
109115 */
110- private static final String PROPS_CONFIGURATION_FACTORY_V2 = "org.apache.logging.log4j.core.config.properties.PropertiesConfigurationFactory" ;
116+ static final String PROPS_CONFIGURATION_FACTORY_V2 = "org.apache.logging.log4j.core.config.properties.PropertiesConfigurationFactory" ;
111117
112118 /**
113119 * Configuration factory for properties files (Log4j 3, optional dependency).
114120 */
115- private static final String PROPS_CONFIGURATION_FACTORY_V3 = "org.apache.logging.log4j.config.properties.JavaPropsConfigurationFactory" ;
121+ static final String PROPS_CONFIGURATION_FACTORY_V3 = "org.apache.logging.log4j.config.properties.JavaPropsConfigurationFactory" ;
116122
117123 /**
118124 * YAML tree parser used by Log4j 2 (optional dependency).
119125 */
120- private static final String YAML_TREE_PARSER_V2 = "com.fasterxml.jackson.dataformat.yaml.YAMLMapper" ;
126+ static final String YAML_TREE_PARSER_V2 = "com.fasterxml.jackson.dataformat.yaml.YAMLMapper" ;
121127
122128 /**
123129 * Configuration factory for YAML files (Log4j 2, embedded).
124130 */
125- private static final String YAML_CONFIGURATION_FACTORY_V2 = "org.apache.logging.log4j.core.config.yaml.YamlConfigurationFactory" ;
131+ static final String YAML_CONFIGURATION_FACTORY_V2 = "org.apache.logging.log4j.core.config.yaml.YamlConfigurationFactory" ;
126132
127133 /**
128134 * Configuration factory for YAML files (Log4j 3, optional dependency).
129135 */
130- private static final String YAML_CONFIGURATION_FACTORY_V3 = "org.apache.logging.log4j.config.yaml.YamlConfigurationFactory" ;
136+ static final String YAML_CONFIGURATION_FACTORY_V3 = "org.apache.logging.log4j.config.yaml.YamlConfigurationFactory" ;
131137
132138 private static final SpringEnvironmentPropertySource propertySource = new SpringEnvironmentPropertySource ();
133139
@@ -260,11 +266,11 @@ private boolean isJulUsingASingleConsoleHandlerAtMost() {
260266
261267 private boolean isLog4jLogManagerInstalled () {
262268 final String logManagerClassName = java .util .logging .LogManager .getLogManager ().getClass ().getName ();
263- return Log4J2RuntimeHints . LOG4J_LOG_MANAGER .equals (logManagerClassName );
269+ return LOG4J_LOG_MANAGER .equals (logManagerClassName );
264270 }
265271
266272 private boolean isLog4jBridgeHandlerAvailable () {
267- return ClassUtils .isPresent (Log4J2RuntimeHints . LOG4J_BRIDGE_HANDLER , getClassLoader ());
273+ return ClassUtils .isPresent (LOG4J_BRIDGE_HANDLER , getClassLoader ());
268274 }
269275
270276 private void removeLog4jBridgeHandler () {
@@ -616,8 +622,10 @@ protected String getDefaultLogCorrelationPattern() {
616622 @ Order (0 )
617623 public static class Factory implements LoggingSystemFactory {
618624
619- private static final boolean PRESENT = ClassUtils
620- .isPresent ("org.apache.logging.log4j.core.impl.Log4jContextFactory" , Factory .class .getClassLoader ());
625+ static final String LOG4J_CORE_CONTEXT_FACTORY = "org.apache.logging.log4j.core.impl.Log4jContextFactory" ;
626+
627+ private static final boolean PRESENT = ClassUtils .isPresent (LOG4J_CORE_CONTEXT_FACTORY ,
628+ Factory .class .getClassLoader ());
621629
622630 @ Override
623631 public @ Nullable LoggingSystem getLoggingSystem (ClassLoader classLoader ) {
0 commit comments