Skip to content

Commit

Permalink
update log4j to version 2.17.1
Browse files Browse the repository at this point in the history
  • Loading branch information
jvanzadelhoff committed Jan 17, 2022
1 parent 431e2b8 commit 713d63b
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 28 deletions.
2 changes: 1 addition & 1 deletion build.properties.sample
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ oai-pmh.dcatde.contributorID=http:https://dcat-ap.de/def/contributors/gdiDE

oai-pmh.csw.serviceShowMetadata.URL=https://localhost:8080/inspire/srv/eng/xml_iso19139?uuid=%uid%

oai-pmh.log.file=${catalina.base}/logs/open-nrw-ci-fassaden.log
oai-pmh.log.file=${sys:catalina.base}/logs/open-nrw-ci-fassaden.log
16 changes: 14 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,19 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>${log4j.version}</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>${log4j.version}</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>${log4j.version}</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
Expand Down Expand Up @@ -214,6 +225,7 @@
<properties>
<camel.version>3.14.0</camel.version>
<spring-boot.version>2.6.1</spring-boot.version>
<log4j.version>2.17.1</log4j.version>

<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
import org.apache.log4j.Logger;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import javax.xml.transform.Source;
import javax.xml.transform.TransformerException;
Expand All @@ -24,7 +25,7 @@
*/
public class HttpAwareUriResolver extends XsltUriResolver {

private final static Logger LOG = Logger.getLogger(HttpAwareUriResolver.class);
private final static Logger LOG = LogManager.getLogger(HttpAwareUriResolver.class);

private static HttpClient httpClient = HttpClients.custom()
.setConnectionManager(new PoolingHttpClientConnectionManager()).build();
Expand Down
23 changes: 0 additions & 23 deletions src/main/resources/log4j.xml

This file was deleted.

15 changes: 15 additions & 0 deletions src/main/resources/log4j2.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?>
<Configuration>
<Appenders>
<RollingFile name="LOGFILE" fileName="${oai-pmh.log.file}" filePattern="${oai-pmh.log.file}%i">
<PatternLayout pattern="[%-5p] %d{ISO8601} [%t] %c - %m%n"/>
<SizeBasedTriggeringPolicy size="5 MB"/>
<DefaultRolloverStrategy max="3"/>
</RollingFile >
</Appenders>
<Loggers>
<Root level="info">
<AppenderRef ref="LOGFILE"/>
</Root>
</Loggers>
</Configuration>

0 comments on commit 713d63b

Please sign in to comment.