mirror of https://github.com/apache/jclouds.git
JCLOUDS-1589: Upgrade to log4j 2.16.0
This addresses a critical CVE: https://logging.apache.org/log4j/2.x/security.html
This commit is contained in:
parent
14e92fc8c8
commit
dbd8eb1dab
|
@ -59,8 +59,8 @@
|
|||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-core</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
|
|
@ -59,8 +59,8 @@
|
|||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-core</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
|
|
@ -79,8 +79,8 @@
|
|||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-core</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
|
|
@ -59,8 +59,8 @@
|
|||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-core</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
|
|
@ -44,8 +44,8 @@
|
|||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-core</artifactId>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
|
|
@ -16,9 +16,6 @@
|
|||
*/
|
||||
package org.jclouds.logging.log4j;
|
||||
|
||||
import static org.apache.log4j.Level.ERROR;
|
||||
import static org.apache.log4j.Level.WARN;
|
||||
|
||||
import org.jclouds.logging.BaseLogger;
|
||||
import org.jclouds.logging.Logger;
|
||||
|
||||
|
@ -26,17 +23,17 @@ import org.jclouds.logging.Logger;
|
|||
* {@link org.apache.log4j.Logger} implementation of {@link Logger}.
|
||||
*/
|
||||
public class Log4JLogger extends BaseLogger {
|
||||
private final org.apache.log4j.Logger logger;
|
||||
private final org.apache.logging.log4j.Logger logger;
|
||||
private final String category;
|
||||
|
||||
public static class Log4JLoggerFactory implements LoggerFactory {
|
||||
public Logger getLogger(String category) {
|
||||
return new Log4JLogger(category, org.apache.log4j.Logger
|
||||
return new Log4JLogger(category, org.apache.logging.log4j.LogManager
|
||||
.getLogger(category));
|
||||
}
|
||||
}
|
||||
|
||||
public Log4JLogger(String category, org.apache.log4j.Logger logger) {
|
||||
public Log4JLogger(String category, org.apache.logging.log4j.Logger logger) {
|
||||
this.category = category;
|
||||
this.logger = logger;
|
||||
}
|
||||
|
@ -79,7 +76,7 @@ public class Log4JLogger extends BaseLogger {
|
|||
}
|
||||
|
||||
public boolean isWarnEnabled() {
|
||||
return logger.isEnabledFor(WARN);
|
||||
return logger.isWarnEnabled();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -93,7 +90,7 @@ public class Log4JLogger extends BaseLogger {
|
|||
}
|
||||
|
||||
public boolean isErrorEnabled() {
|
||||
return logger.isEnabledFor(ERROR);
|
||||
return logger.isErrorEnabled();
|
||||
}
|
||||
|
||||
public String getCategory() {
|
||||
|
|
|
@ -61,8 +61,8 @@
|
|||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-core</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
|
|
@ -236,7 +236,7 @@
|
|||
<modernizer-maven-annotations.version>1.8.0</modernizer-maven-annotations.version>
|
||||
|
||||
<!-- Log dependency versions -->
|
||||
<log4j.version>1.2.17</log4j.version>
|
||||
<log4j.version>2.16.0</log4j.version>
|
||||
<logback.version>1.1.2</logback.version>
|
||||
|
||||
<!-- OSGi dependency versions -->
|
||||
|
@ -336,8 +336,8 @@
|
|||
|
||||
<!-- Log dependencies -->
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-core</artifactId>
|
||||
<version>${log4j.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
|
|
@ -66,8 +66,8 @@
|
|||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-core</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
|
|
@ -59,8 +59,8 @@
|
|||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-core</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
|
Loading…
Reference in New Issue