ramanathan1504 commented on code in PR #4433:
URL: https://github.com/apache/logging-log4j2/pull/4433#discussion_r4385434796
##########
log4j-core/src/main/java/org/apache/logging/log4j/core/config/LoggerConfig.java:
##########
@@ -201,6 +201,19 @@ public B asBuilder() {
}
}
+ /**
+ * Constructor that sets the name, level and additive values.
+ * @deprecated - For comapatibilty with 2.x.
Review Comment:
The javadoc has a typo, and it does not name the replacement.
```suggestion
* @deprecated Use {@link #LoggerConfig(String, Level, boolean,
Configuration)} instead.
```
##########
log4j-core/src/main/java/org/apache/logging/log4j/core/config/LoggerConfig.java:
##########
@@ -201,6 +201,19 @@ public B asBuilder() {
}
}
+ /**
+ * Constructor that sets the name, level and additive values.
+ * @deprecated - For comapatibilty with 2.x.
+ *
+ * @param name The Logger name.
+ * @param level The Level.
+ * @param additive true if the Logger is additive, false otherwise.
+ */
+ @Deprecated
+ public LoggerConfig(final String name, final Level level, final boolean
additive) {
Review Comment:
`this(..., null, true)` passes `config = null`, and the protected
constructor calls `config.getLogEventFactory()` on its second line. So `new
LoggerConfig("a", Level.INFO, true)` throws `NullPointerException`. 2.x set
`LOG_EVENT_FACTORY` and `new DefaultReliabilityStrategy(this)` here. A test
that calls this constructor would catch it.
--
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]