Skip to content

Commit b3b8456

Browse files
committed
some missed changes to log4j2
1 parent bf41ddb commit b3b8456

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

pom.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,16 @@
150150
<version>2.18.0</version>
151151
<scope>compile</scope>
152152
</dependency>
153+
<dependency>
154+
<groupId>org.apache.logging.log4j</groupId>
155+
<artifactId>log4j-api</artifactId>
156+
<version>2.18.0</version>
157+
</dependency>
158+
<dependency>
159+
<groupId>org.apache.logging.log4j</groupId>
160+
<artifactId>log4j-slf4j-impl</artifactId>
161+
<version>2.18.0</version>
162+
</dependency>
153163
<dependency>
154164
<groupId>commons-io</groupId>
155165
<artifactId>commons-io</artifactId>

src/main/java/pl/psnc/dl/ege/EGEImpl.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,18 @@ public class EGEImpl
5656
try {
5757
String pathToProps = EGEConstants.OXGAPP + "log4j.xml";
5858
File conf = new File(pathToProps);
59+
LOGGER.debug("now trying to configure the logger");
5960
if (conf.exists()) {
61+
LOGGER.debug("logger conf exists at " + pathToProps);
62+
Configurator.setRootLevel(Level.DEBUG);
6063
ConfigurationFactory.setConfigurationFactory(new XmlConfigurationFactory());
61-
Configurator.reconfigure(new URI("pathToProps"));
64+
Configurator.reconfigure(new URI(pathToProps));
65+
6266
}
6367
else {
6468
Configurator.initialize(new DefaultConfiguration());
6569
Configurator.setRootLevel(Level.ERROR);
70+
LOGGER.error("logger conf does not exist");
6671
}
6772
}
6873
catch (Exception e1) {

0 commit comments

Comments
 (0)