From 408886c8b83c340141a93f725eb38dce614bddc7 Mon Sep 17 00:00:00 2001 From: "Christian P. MOMON" Date: Wed, 22 Jan 2020 19:28:48 +0100 Subject: [PATCH] Fixed log4j configuration load. --- src/org/april/agirstatool/cli/AgiStatoolCLI.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/org/april/agirstatool/cli/AgiStatoolCLI.java b/src/org/april/agirstatool/cli/AgiStatoolCLI.java index 6241481..4c9ff5c 100644 --- a/src/org/april/agirstatool/cli/AgiStatoolCLI.java +++ b/src/org/april/agirstatool/cli/AgiStatoolCLI.java @@ -172,8 +172,9 @@ public final class AgiStatoolCLI else { // Apply -c parameter. - logger.info("Applying configuration file found in [{}].", configurationFile.getAbsoluteFile()); - PropertyConfigurator.configure(configurationFile.getAbsolutePath()); + File log4jfile = new File(configurationFile.getParentFile(), "log4j.properties"); + logger.info("Applying configuration file found in [{}].", log4jfile.getAbsoluteFile()); + PropertyConfigurator.configure(log4jfile.getAbsolutePath()); logger.info("Configuration log configuration done."); switch (command)