svn commit: r14023 - trunk/src_new/org/argouml: application configuration resource

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: penyaskito
Date: 2008-01-06 20:46:04-0800
New Revision: 14023

Modified:
   trunk/src_new/org/argouml/application/Main.java
   trunk/src_new/org/argouml/configuration/ConfigurationProperties.java
   trunk/src_new/org/argouml/resource/default.lcf
   trunk/src_new/org/argouml/resource/full.lcf

Log:
Moved the log to the .argouml dir in the user's home. Closes issue 4958.

Modified: trunk/src_new/org/argouml/application/Main.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/application/Main.java?view=diff&rev=14023&p1=trunk/src_new/org/argouml/application/Main.java&p2=trunk/src_new/org/argouml/application/Main.java&r1=14022&r2=14023
==============================================================================
--- trunk/src_new/org/argouml/application/Main.java	(original)
+++ trunk/src_new/org/argouml/application/Main.java	2008-01-06 20:46:04-0800
@@ -716,6 +716,19 @@
     }
 
     /**
+     * Create the .argouml directory if it doesn't exist. 
+     * This is done here because it must be done before 
+     * setting the log configuration.
+     */
+    static {
+        File argoDir = new File(System.getProperty("user.home") 
+                + File.separator + ".argouml");
+        if (!argoDir.exists()) {
+            argoDir.mkdir();
+        }
+    }
+    
+    /**
      * Install our security handlers,
      * and do basic initialization of log4j.
      *

Modified: trunk/src_new/org/argouml/configuration/ConfigurationProperties.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/configuration/ConfigurationProperties.java?view=diff&rev=14023&p1=trunk/src_new/org/argouml/configuration/ConfigurationProperties.java&p2=trunk/src_new/org/argouml/configuration/ConfigurationProperties.java&r1=14022&r2=14023
==============================================================================
--- trunk/src_new/org/argouml/configuration/ConfigurationProperties.java	(original)
+++ trunk/src_new/org/argouml/configuration/ConfigurationProperties.java	2008-01-06 20:46:04-0800
@@ -117,12 +117,6 @@
             }
             // Try to create an empty file.
             try {
-                File parent = file.getParentFile();
-                // create the argouml dir if it doesn't exist
-                if (!parent.exists()) {
-                    parent.mkdir();
-                    LOG.info("New argouml home dir created as " + parent);
-                }
                 // This is done for compatibility with previous version: 
                 // Move the argo.user.properties
                 // written before 0.25.4 to the new location, if it exists.

Modified: trunk/src_new/org/argouml/resource/default.lcf
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/resource/default.lcf?view=diff&rev=14023&p1=trunk/src_new/org/argouml/resource/default.lcf&p2=trunk/src_new/org/argouml/resource/default.lcf&r1=14022&r2=14023
==============================================================================
Binary files. No diff available.

Modified: trunk/src_new/org/argouml/resource/full.lcf
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/resource/full.lcf?view=diff&rev=14023&p1=trunk/src_new/org/argouml/resource/full.lcf&p2=trunk/src_new/org/argouml/resource/full.lcf&r1=14022&r2=14023
==============================================================================
--- trunk/src_new/org/argouml/resource/full.lcf	(original)
+++ trunk/src_new/org/argouml/resource/full.lcf	2008-01-06 20:46:04-0800
@@ -7,7 +7,7 @@
 log4j.category.org.argouml=DEBUG
 # 
 log4j.appender.FULL=org.apache.log4j.RollingFileAppender
-log4j.appender.FULL.File=${user.home}/argo_full.log
+log4j.appender.FULL.File=${user.home}/.argouml/argo_full.log
 log4j.appender.FULL.MaxBackupIndex=4
 log4j.appender.FULL.MaxFileSize=1000000
 log4j.appender.FULL.layout=org.apache.log4j.PatternLayout
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.