You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by fm...@apache.org on 2008/09/26 14:03:38 UTC
svn commit: r699290 -
/incubator/sling/trunk/launchpad/base/src/main/java/org/apache/sling/launcher/app/main/Main.java
Author: fmeschbe
Date: Fri Sep 26 05:03:37 2008
New Revision: 699290
URL: http://svn.apache.org/viewvc?rev=699290&view=rev
Log:
SLING-670 Apply patch by Moritz Havelock (Many Thanks!)
Modified:
incubator/sling/trunk/launchpad/base/src/main/java/org/apache/sling/launcher/app/main/Main.java
Modified: incubator/sling/trunk/launchpad/base/src/main/java/org/apache/sling/launcher/app/main/Main.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/launchpad/base/src/main/java/org/apache/sling/launcher/app/main/Main.java?rev=699290&r1=699289&r2=699290&view=diff
==============================================================================
--- incubator/sling/trunk/launchpad/base/src/main/java/org/apache/sling/launcher/app/main/Main.java (original)
+++ incubator/sling/trunk/launchpad/base/src/main/java/org/apache/sling/launcher/app/main/Main.java Fri Sep 26 05:03:37 2008
@@ -98,7 +98,7 @@
private static Map<String, String> commandLine;
public static void main(String[] args) throws Exception {
- // creating the instance launches the framework and we are done here ..
+
Map<String, String> props = new HashMap<String, String>();
// parse the command line (exit in case of failure)
@@ -111,10 +111,6 @@
props.put(Sling.SLING_HOME, commandLine.get(Sling.SLING_HOME));
}
- // overwrite the loadPropertiesOverride method to inject the command
- // line arguments unconditionally. These will not be persisted in any
- // properties file, though
-
// set up and configure Felix Logger
int logLevel;
if (!commandLine.containsKey(PROP_LOG_LEVEL)) {
@@ -127,17 +123,18 @@
Logger logger = new Logger();
// prevent tons of needless WARN from the framework
- // logger.setLogLevel(logLevel);
- logger.setLogLevel(Logger.LOG_ERROR);
-
- // prevent tons of needless WARN messages from the framework
- // logger.setLogLevel(logLevel);
logger.setLogLevel(Logger.LOG_ERROR);
try {
ResourceProvider resProvider = new ClassLoaderResourceProvider(
Main.class.getClassLoader());
+
+ // creating the instance launches the framework and we are done here ..
Sling sling = new Sling(logger, resProvider, props) {
+
+ // overwrite the loadPropertiesOverride method to inject the command
+ // line arguments unconditionally. These will not be persisted in any
+ // properties file, though
protected void loadPropertiesOverride(
Map<String, String> properties) {
if (commandLine != null) {