From a015ad3e407e504518656689e9569e615e3e60eb Mon Sep 17 00:00:00 2001 From: tkellner Date: Wed, 10 Apr 2013 19:23:52 +0000 Subject: + extracting log4j config to ~/.pdfover + loading log4j properties from the local file git-svn-id: https://joinup.ec.europa.eu/svn/pdf-over/trunk@298 174cde9d-5d70-4d2a-aa98-46368bc2aaf7 --- .../src/main/java/at/asit/pdfover/gui/DeveloperMain.java | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'pdf-over-gui/src/main/java/at/asit/pdfover/gui/DeveloperMain.java') diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/DeveloperMain.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/DeveloperMain.java index 82bfd2a0..39244f4f 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/DeveloperMain.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/DeveloperMain.java @@ -16,9 +16,13 @@ package at.asit.pdfover.gui; //Imports +import java.io.File; + +import org.apache.log4j.PropertyConfigurator; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import at.asit.pdfover.gui.workflow.ConfigManipulator; import at.asit.pdfover.gui.workflow.StateMachineImpl; /** @@ -42,6 +46,13 @@ public class DeveloperMain { // Set PDF-AS log4j configuration: //System.setProperty("log4j.configuration", "log4j.properties"); + File configDir = new File(System.getProperty("user.home")+"/.pdfover"); //$NON-NLS-1$//$NON-NLS-2$ + if(!configDir.exists()) { + configDir.mkdir(); + } else { + PropertyConfigurator.configure(configDir.getAbsolutePath() + "/" + ConfigManipulator.DEFAULT_LOG4J_FILE); //$NON-NLS-1$ + } + StringBuilder sb = new StringBuilder(); for(int i = 0; i < args.length; i++) { -- cgit v1.2.3