summaryrefslogtreecommitdiff
path: root/pdf-over-gui/src/main/java/at/asit
diff options
context:
space:
mode:
authortkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7>2013-04-10 19:23:57 +0000
committertkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7>2013-04-10 19:23:57 +0000
commit8e4a839f63b69f4411d2fbf44112d4fd5e3e9560 (patch)
tree2c6317c41820f17c13158f978870ab3b0841f6e5 /pdf-over-gui/src/main/java/at/asit
parenta015ad3e407e504518656689e9569e615e3e60eb (diff)
downloadpdf-over-8e4a839f63b69f4411d2fbf44112d4fd5e3e9560.tar.gz
pdf-over-8e4a839f63b69f4411d2fbf44112d4fd5e3e9560.tar.bz2
pdf-over-8e4a839f63b69f4411d2fbf44112d4fd5e3e9560.zip
improved log4j property loading
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-over/trunk@299 174cde9d-5d70-4d2a-aa98-46368bc2aaf7
Diffstat (limited to 'pdf-over-gui/src/main/java/at/asit')
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/DeveloperMain.java7
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/Main.java7
2 files changed, 10 insertions, 4 deletions
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 39244f4f..3bea5d08 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
@@ -49,8 +49,11 @@ public class DeveloperMain {
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$
+ }
+
+ File log4j = new File(configDir.getAbsolutePath() + "/" + ConfigManipulator.DEFAULT_LOG4J_FILE); //$NON-NLS-1$
+ if(log4j.exists()) {
+ PropertyConfigurator.configure(log4j.getAbsolutePath());
}
StringBuilder sb = new StringBuilder();
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Main.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Main.java
index 7318ec7c..98ca7ac8 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Main.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Main.java
@@ -58,8 +58,11 @@ public class Main {
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$
+ }
+
+ File log4j = new File(configDir.getAbsolutePath() + "/" + ConfigManipulator.DEFAULT_LOG4J_FILE); //$NON-NLS-1$
+ if(log4j.exists()) {
+ PropertyConfigurator.configure(log4j.getAbsolutePath());
}
StateMachineImpl stateMachine = new StateMachineImpl(args);