ramanathan1504 commented on code in PR #4410:
URL: https://github.com/apache/logging-log4j2/pull/4410#discussion_r4333766385
##########
log4j-core/src/main/java/org/apache/logging/log4j/core/config/yaml/YamlConfigurationFactory.java:
##########
@@ -42,17 +54,33 @@ public class YamlConfigurationFactory extends
ConfigurationFactory {
private final boolean isActive;
+ private final boolean useJackson3;
+
public YamlConfigurationFactory() {
- for (final String dependency : dependencies) {
- if (!Loader.isClassAvailable(dependency)) {
- LOGGER.debug(
- "Missing dependencies for Yaml support,
ConfigurationFactory {} is inactive",
- getClass().getName());
- isActive = false;
- return;
+ if (areClassesAvailable(JACKSON3_DEPENDENCIES)) {
+ LOGGER.debug("Using Jackson 3.x for Yaml support");
+ useJackson3 = true;
+ isActive = true;
+ } else if (areClassesAvailable(JACKSON2_DEPENDENCIES)) {
+ LOGGER.debug("Using Jackson 2.x for Yaml support");
+ useJackson3 = false;
+ isActive = true;
Review Comment:
Fair point, a Jackson 3 build is an upgrade. Can the changelog entry say
that YAML values are read as YAML 1.2 when Jackson 3 is present, so `on` and
`yes` are no longer booleans?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]