Commit 189285b2 authored by Julian Zobel's avatar Julian Zobel 🦄 Committed by Lukas Wehrstein
Browse files

Upgrade Log4j to current 2.15.0 version.


(cherry picked from commit d0bac56c)
parent c22f3b76
...@@ -150,12 +150,24 @@ ...@@ -150,12 +150,24 @@
<version>1.4</version> <version>1.4</version>
</dependency> </dependency>
<!-- Logging -->
<!-- Logging with Log4j -->
<!-- https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-core -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.15.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-api -->
<dependency> <dependency>
<groupId>log4j</groupId> <groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j</artifactId> <artifactId>log4j-api</artifactId>
<version>1.2.16</version> <version>2.15.0</version>
</dependency> </dependency>
<!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-api --> <!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-api -->
<dependency> <dependency>
<groupId>org.slf4j</groupId> <groupId>org.slf4j</groupId>
......
...@@ -29,7 +29,8 @@ import java.util.LinkedList; ...@@ -29,7 +29,8 @@ import java.util.LinkedList;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import org.apache.log4j.Logger; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import de.tud.kom.p2psim.api.simengine.SimulatorObserver; import de.tud.kom.p2psim.api.simengine.SimulatorObserver;
import de.tud.kom.p2psim.impl.simengine.Simulator; import de.tud.kom.p2psim.impl.simengine.Simulator;
...@@ -94,7 +95,7 @@ public class DefaultMonitor implements MonitorComponent, EventHandler, ...@@ -94,7 +95,7 @@ public class DefaultMonitor implements MonitorComponent, EventHandler,
public void log(Class<?> subject, Level level, String msg, Object... data) { public void log(Class<?> subject, Level level, String msg, Object... data) {
Logger log = loggers.get(subject); Logger log = loggers.get(subject);
if (log == null) { if (log == null) {
log = Logger.getLogger(subject); log = LogManager.getLogger(subject);
loggers.put(subject, log); loggers.put(subject, log);
} }
switch (level) { switch (level) {
......
...@@ -20,7 +20,9 @@ ...@@ -20,7 +20,9 @@
package de.tud.kom.p2psim.impl.scenario.simcfg2.utils; package de.tud.kom.p2psim.impl.scenario.simcfg2.utils;
import de.tud.kom.p2psim.impl.scenario.simcfg2.configuration.SimCfgConfiguration; import de.tud.kom.p2psim.impl.scenario.simcfg2.configuration.SimCfgConfiguration;
import org.apache.log4j.Logger;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import javax.script.*; import javax.script.*;
import java.util.Map; import java.util.Map;
...@@ -30,7 +32,7 @@ import java.util.Map; ...@@ -30,7 +32,7 @@ import java.util.Map;
* @version 1.0, 12.07.13 * @version 1.0, 12.07.13
*/ */
public class SimCfgExpressionExecutor { public class SimCfgExpressionExecutor {
private static final Logger log = Logger.getLogger(SimCfgExpressionExecutor.class); private static final Logger log = LogManager.getLogger(SimCfgExpressionExecutor.class);
private ScriptEngine javascriptEngine = null; private ScriptEngine javascriptEngine = null;
public SimCfgExpressionExecutor() { public SimCfgExpressionExecutor() {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment