From b3b8456cb775f48c2d3d201fc76b98a586e573b6 Mon Sep 17 00:00:00 2001 From: Anne Ferger Date: Fri, 19 Aug 2022 08:23:11 +0200 Subject: [PATCH] some missed changes to log4j2 --- pom.xml | 10 ++++++++++ src/main/java/pl/psnc/dl/ege/EGEImpl.java | 7 ++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index cffd687..375fcbb 100644 --- a/pom.xml +++ b/pom.xml @@ -150,6 +150,16 @@ 2.18.0 compile + + org.apache.logging.log4j + log4j-api + 2.18.0 + + + org.apache.logging.log4j + log4j-slf4j-impl + 2.18.0 + commons-io commons-io diff --git a/src/main/java/pl/psnc/dl/ege/EGEImpl.java b/src/main/java/pl/psnc/dl/ege/EGEImpl.java index a5afd53..082ff98 100644 --- a/src/main/java/pl/psnc/dl/ege/EGEImpl.java +++ b/src/main/java/pl/psnc/dl/ege/EGEImpl.java @@ -56,13 +56,18 @@ public class EGEImpl try { String pathToProps = EGEConstants.OXGAPP + "log4j.xml"; File conf = new File(pathToProps); + LOGGER.debug("now trying to configure the logger"); if (conf.exists()) { + LOGGER.debug("logger conf exists at " + pathToProps); + Configurator.setRootLevel(Level.DEBUG); ConfigurationFactory.setConfigurationFactory(new XmlConfigurationFactory()); - Configurator.reconfigure(new URI("pathToProps")); + Configurator.reconfigure(new URI(pathToProps)); + } else { Configurator.initialize(new DefaultConfiguration()); Configurator.setRootLevel(Level.ERROR); + LOGGER.error("logger conf does not exist"); } } catch (Exception e1) {