rgoers commented on code in PR #4433:
URL: https://github.com/apache/logging-log4j2/pull/4433#discussion_r4392746288
##########
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:
I looked at the error I am getting. It happens in a unit test for my Spring
Boot application. It is failing at
https://github.com/spring-projects/spring-boot/blob/main/core/spring-boot/src/main/java/org/springframework/boot/logging/log4j2/Log4J2LoggingSystem.java#L559
because it is doing
```
private static class LevelSetLoggerConfig extends LoggerConfig {
LevelSetLoggerConfig(@Nullable String name, Level level,
boolean additive) {
super(name, level, additive);
}
}
```
The constructor it is trying to override doesn't exist.
Spring is calling this from
```
getLoggerContext().getConfiguration()
.addLogger(loggerName, new
LevelSetLoggerConfig(loggerName, level, true));
```
so it would seem setting the configuration from
```
LogManager.getContext(classLoader, false).getConfiguration()
```
would work.
--
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]