]> git.argeo.org Git - gpl/argeo-slc.git/commitdiff
Improve logging
authorMathieu Baudier <mbaudier@argeo.org>
Sat, 21 Jun 2008 12:10:08 +0000 (12:10 +0000)
committerMathieu Baudier <mbaudier@argeo.org>
Sat, 21 Jun 2008 12:10:08 +0000 (12:10 +0000)
git-svn-id: https://svn.argeo.org/slc/trunk@1263 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc

org.argeo.slc.agent/src/main/java/org/argeo/slc/ant/AntSlcApplication.java
org.argeo.slc.agent/src/main/java/org/argeo/slc/cli/SlcMain.java

index a63e56d669044b40f8968a1424d5f5a474993243..aac37a3b1fbe8b73ea771b8ead8edf56e9b508ff 100644 (file)
@@ -49,8 +49,9 @@ public class AntSlcApplication {
                // Properties and app logging initialization
                initSystemProperties(properties);
                Log4jUtils.initLog4j("classpath:" + DEFAULT_APP_LOG4J_PROPERTIES);
-               
-               log.info("### Start SLC execution " + slcExecution.getUuid() + " ###");
+
+               log.info("\n###\n### Start SLC execution " + slcExecution.getUuid()
+                               + "\n###\n");
                if (log.isDebugEnabled()) {
                        log.debug("rootDir=" + rootDir);
                        log.debug("confDir=" + confDir);
@@ -63,7 +64,7 @@ public class AntSlcApplication {
                // Ant coordinates
                Resource script = findAntScript(slcExecution);
                List<String> targets = findAntTargets(slcExecution);
-               
+
                // Ant project initialization
                Project project = new Project();
                AntExecutionContext executionContext = new AntExecutionContext(project);
index 39ff6aa411ec11ec949e7a73dd83f487c2f21c8c..fd6a402093ff21cd411996b79a464a97089a2278 100644 (file)
@@ -146,14 +146,14 @@ public class SlcMain {
        }
 
        private static void initLogging(Properties userProperties) {
+               System.setProperty("log4j.defaultInitOverride", "true");
+
                // Add log4j user properties to System properties
                for (String key : userProperties.stringPropertyNames()) {
                        if (key.startsWith("log4j.")) {
-                                       System.setProperty(key, userProperties.getProperty(key));
+                               System.setProperty(key, userProperties.getProperty(key));
                        }
                }
-               
-               System.setProperty("log4j.defaultInitOverride", "true");
                Log4jUtils.initLog4j(System.getProperty("log4j.configuration",
                                "classpath:" + BOOTSTRAP_LOG4J_CONFIG));
                log = LogFactory.getLog(SlcMain.class);