Skip to content
This repository was archived by the owner on Aug 6, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apis/atmos/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
4 changes: 2 additions & 2 deletions apis/cloudwatch/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
4 changes: 2 additions & 2 deletions apis/s3/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
4 changes: 2 additions & 2 deletions apis/sts/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
4 changes: 2 additions & 2 deletions drivers/log4j/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,24 @@
*/
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;

/**
* {@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;
}
Expand Down Expand Up @@ -79,7 +76,7 @@ protected void logWarn(String message, Throwable e) {
}

public boolean isWarnEnabled() {
return logger.isEnabledFor(WARN);
return logger.isWarnEnabled();
}

@Override
Expand All @@ -93,7 +90,7 @@ protected void logError(String message, Throwable e) {
}

public boolean isErrorEnabled() {
return logger.isEnabledFor(ERROR);
return logger.isErrorEnabled();
}

public String getCategory() {
Expand Down
4 changes: 2 additions & 2 deletions loadbalancer/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
6 changes: 3 additions & 3 deletions project/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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 -->
Expand Down Expand Up @@ -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>
Expand Down
4 changes: 2 additions & 2 deletions providers/b2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
4 changes: 2 additions & 2 deletions skeletons/standalone-compute/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down