Skip to content

Commit

Permalink
Merge pull request #427 from devonfw/bugfix/log4j-upgrade2
Browse files Browse the repository at this point in the history
Updates log4j version
  • Loading branch information
mbabiarzCap authored Apr 19, 2024
2 parents 2f0f5a7 + 68f00ad commit 61c58f2
Show file tree
Hide file tree
Showing 7 changed files with 202 additions and 209 deletions.
40 changes: 15 additions & 25 deletions mrchecker-playwright-framework/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.capgemini.mrchecker</groupId>
<artifactId>playwright</artifactId>
<version>2024.03.19</version>
<version>2024.04.18</version>

<organization>
<name>Capgemini - Nearshore Test Center - Poland</name>
Expand Down Expand Up @@ -47,9 +47,9 @@
<allure-junit5.version>2.25.0</allure-junit5.version>
<allure.report.directory>${project.basedir}/target</allure.report.directory>

<slf4j.version>2.0.6</slf4j.version>
<log4j.version>1.2.17</log4j.version>
<log4j-core.version>2.17.1</log4j-core.version>
<!-- Logger -->
<log4j.version>2.20.0</log4j.version>
<slf4j.version>1.7.30</slf4j.version>
<json-simple.version>1.1.1</json-simple.version>
<datafaker.version>2.1.0</datafaker.version>
<jasyp.version>1.9.3</jasyp.version>
Expand Down Expand Up @@ -86,6 +86,13 @@
<artifactId>allure-maven</artifactId>
<version>${allure-maven.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-simple
To satisfy allure-maven dependency-->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>${slf4j.version}</version>
</dependency>

<dependency>
<groupId>io.qameta.allure</groupId>
Expand Down Expand Up @@ -120,33 +127,16 @@
</dependency>


<!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-simple -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>${slf4j.version}</version>
<scope>test</scope>
</dependency>

<!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-api -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>

<!-- https://mvnrepository.com/artifact/log4j/log4j -->
<!--This dependency is necessary for Logger. -->
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>${log4j.version}</version>
</dependency>

<!-- https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-core -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>${log4j-core.version}</version>
<version>${log4j.version}</version>
</dependency>

<!-- https://mvnrepository.com/artifact/com.googlecode.json-simple/json-simple -->
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package com.capgemini.framework.logger;

import org.apache.logging.log4j.core.LoggerContext;
import org.apache.logging.log4j.core.config.ConfigurationSource;
import org.apache.logging.log4j.core.config.xml.XmlConfiguration;

public class LoggerConfiguration extends XmlConfiguration {
public LoggerConfiguration(LoggerContext context, ConfigurationSource configSource) {
super(context, configSource);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package com.capgemini.framework.logger;

import org.apache.logging.log4j.core.LoggerContext;
import org.apache.logging.log4j.core.config.Configuration;
import org.apache.logging.log4j.core.config.ConfigurationFactory;
import org.apache.logging.log4j.core.config.ConfigurationSource;
import org.apache.logging.log4j.core.config.Order;
import org.apache.logging.log4j.core.config.plugins.Plugin;

/**
* https://logging.apache.org/log4j/log4j-2.4/manual/customconfig.html Combining Configuration File with Programmatic
* Configuration
*/
@Plugin(name = "LoggerConfigurationFactory", category = "ConfigurationFactory")
@Order(10)
public class LoggerConfigurationFactory extends ConfigurationFactory {
public static final String[] SUFFIXES = new String[]{".xml", "*"};

@Override
public String[] getSupportedTypes() {
return SUFFIXES;
}

@Override
public Configuration getConfiguration(LoggerContext loggerContext, ConfigurationSource source) {
return new LoggerConfiguration(loggerContext, source);
}
}

This file was deleted.

Loading

0 comments on commit 61c58f2

Please sign in to comment.