Remove log4j from documentation tests (#27929)

Signed-off-by: stianst <stianst@gmail.com>
This commit is contained in:
Stian Thorgersen 2024-03-15 15:06:24 +01:00 committed by GitHub
parent fa8485e10e
commit 2bddfe7380
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 4 additions and 39 deletions

View file

@ -3,7 +3,6 @@
<modelVersion>4.0.0</modelVersion>
<properties>
<version.log4j>2.17.1</version.log4j>
<!-- this property prevents the warning "WARN FilenoUtil: Native subprocess control requires open access" when using JRuby for the unit tests on JDK17 -->
<surefire.system.args>
--add-opens=java.base/sun.nio.ch=ALL-UNNAMED
@ -124,18 +123,6 @@
<version>2.7</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>${version.log4j}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>${version.log4j}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctorj</artifactId>
@ -148,10 +135,6 @@
<version>5.0.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-reload4j</artifactId>
</dependency>
</dependencies>
</project>

View file

@ -1,8 +1,6 @@
package org.keycloak.documentation.test;
import org.apache.commons.io.IOUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.asciidoctor.Asciidoctor;
import org.asciidoctor.AttributesBuilder;
import org.asciidoctor.OptionsBuilder;
@ -16,8 +14,6 @@ import java.util.Map;
public class Config {
private static final Logger log = LogManager.getLogger(Config.class);
protected static final Config instance = new Config();
private File docsRootDir;

View file

@ -1,7 +1,5 @@
package org.keycloak.documentation.test;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.keycloak.documentation.test.utils.DocUtils;
import java.io.File;
@ -12,8 +10,6 @@ import java.util.Map;
public class Guide {
private static final Logger log = LogManager.getLogger(Guide.class);
protected DocUtils utils = new DocUtils();
private String guide;
@ -36,7 +32,6 @@ public class Guide {
File htmlFile = config.getGuideHtmlFile(guide);
body = utils.readBody(htmlFile);
} else {
log.info("Loading guide from '" + guideUrl);
body = utils.readBody(new URL(guideUrl));
}

View file

@ -1,8 +1,6 @@
package org.keycloak.documentation.test.utils;
import org.apache.commons.io.FileUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.keycloak.documentation.test.Config;
import org.keycloak.documentation.test.Guide;
@ -11,20 +9,18 @@ import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.net.URL;
import java.util.Map;
import java.util.List;
import java.util.Set;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.Set;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class LinkUtils {
private static final Logger logger = LogManager.getLogger(LinkUtils.class);
private static final LinkUtils instance = new LinkUtils();
private HttpUtils http = new HttpUtils();

View file

@ -1,5 +0,0 @@
log4j.rootLogger=info, keycloak
log4j.appender.keycloak=org.apache.log4j.ConsoleAppender
log4j.appender.keycloak.layout=org.apache.log4j.PatternLayout
log4j.appender.keycloak.layout.ConversionPattern=%d{HH:mm:ss,SSS} %-5p [%c] %m%n