r9485 - in helma-ng/trunk: modules modules/config modules/helma src/org/helma/tools/launcher

[email protected]
Newsgroups gmane.comp.java.helma.cvs
Message-ID <[email protected]>
Author: hannes
Date: 2009-01-15 12:59:24 +0100 (Thu, 15 Jan 2009)
New Revision: 9485

Added:
   helma-ng/trunk/modules/config/
   helma-ng/trunk/modules/config/jetty.xml
   helma-ng/trunk/modules/config/log4j.properties
Removed:
   helma-ng/trunk/modules/helma/jetty.xml
   helma-ng/trunk/modules/helma/log4j.properties
Modified:
   helma-ng/trunk/modules/helma/httpserver.js
   helma-ng/trunk/modules/helma/logging.js
   helma-ng/trunk/src/org/helma/tools/launcher/Main.java
Log:
Move config files to modules/config so we can override them in apps using a config directory.

Details at http://dev.helma.org/trac/helma/changeset/9485

Copied: helma-ng/trunk/modules/config/jetty.xml (from rev 9484, helma-ng/trunk/modules/helma/jetty.xml)

Copied: helma-ng/trunk/modules/config/log4j.properties (from rev 9484, helma-ng/trunk/modules/helma/log4j.properties)

Modified: helma-ng/trunk/modules/helma/httpserver.js
===================================================================
--- helma-ng/trunk/modules/helma/httpserver.js	2009-01-15 11:58:58 UTC (rev 9484)
+++ helma-ng/trunk/modules/helma/httpserver.js	2009-01-15 11:59:24 UTC (rev 9485)
@@ -35,7 +35,7 @@
      */
     this.start = function(config) {
         config = config || {};
-        var configFile = config.configFile || 'jetty.xml';
+        var configFile = config.configFile || 'config/jetty.xml';
         // var staticIndex = config.staticIndex || config.staticIndex == undefined;
         if (!server) {
             var engine = require('helma.system').getRhinoEngine();

Deleted: helma-ng/trunk/modules/helma/jetty.xml

Deleted: helma-ng/trunk/modules/helma/log4j.properties

Modified: helma-ng/trunk/modules/helma/logging.js
===================================================================
--- helma-ng/trunk/modules/helma/logging.js	2009-01-15 11:58:58 UTC (rev 9484)
+++ helma-ng/trunk/modules/helma/logging.js	2009-01-15 11:59:24 UTC (rev 9485)
@@ -32,7 +32,7 @@
     this.getLogger = function(name) {
         if (!configured) {
             // getResource('foo').name gets us the absolute path to a local resource
-            this.setConfig(getResource('log4j.properties').path);
+            this.setConfig(getResource('config/log4j.properties').path);
         }
         return org.apache.log4j.Logger.getLogger(name);
     }

Modified: helma-ng/trunk/src/org/helma/tools/launcher/Main.java
===================================================================
--- helma-ng/trunk/src/org/helma/tools/launcher/Main.java	2009-01-15 11:58:58 UTC (rev 9484)
+++ helma-ng/trunk/src/org/helma/tools/launcher/Main.java	2009-01-15 11:59:24 UTC (rev 9485)
@@ -45,7 +45,7 @@
 
             // set default log4j configuration file
             if (System.getProperty("log4j.configuration") == null) {
-                File file = new File(home, "modules/helma/log4j.properties"); 
+                File file = new File(home, "modules/config/log4j.properties"); 
                 System.setProperty("log4j.configuration", "file:" + file.getPath());
             }
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.