Author: veithen
Date: Sat Dec 26 09:58:12 2015
New Revision: 1721719

URL: http://svn.apache.org/viewvc?rev=1721719&view=rev
Log:
Configure log4j.

Added:
    axis/axis2/java/rampart/trunk/modules/rampart-samples/src/test/conf/
    
axis/axis2/java/rampart/trunk/modules/rampart-samples/src/test/conf/log4j.properties
   (with props)
Modified:
    
axis/axis2/java/rampart/trunk/modules/rampart-samples/src/test/java/org/apache/rampart/samples/runner/Sample.java

Added: 
axis/axis2/java/rampart/trunk/modules/rampart-samples/src/test/conf/log4j.properties
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/rampart/trunk/modules/rampart-samples/src/test/conf/log4j.properties?rev=1721719&view=auto
==============================================================================
--- 
axis/axis2/java/rampart/trunk/modules/rampart-samples/src/test/conf/log4j.properties
 (added)
+++ 
axis/axis2/java/rampart/trunk/modules/rampart-samples/src/test/conf/log4j.properties
 Sat Dec 26 09:58:12 2015
@@ -0,0 +1,24 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+log4j.rootCategory=INFO, CONSOLE
+
+log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
+log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
+log4j.appender.CONSOLE.layout.ConversionPattern=%d %-5p %c - %m%n

Propchange: 
axis/axis2/java/rampart/trunk/modules/rampart-samples/src/test/conf/log4j.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: 
axis/axis2/java/rampart/trunk/modules/rampart-samples/src/test/java/org/apache/rampart/samples/runner/Sample.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/rampart/trunk/modules/rampart-samples/src/test/java/org/apache/rampart/samples/runner/Sample.java?rev=1721719&r1=1721718&r2=1721719&view=diff
==============================================================================
--- 
axis/axis2/java/rampart/trunk/modules/rampart-samples/src/test/java/org/apache/rampart/samples/runner/Sample.java
 (original)
+++ 
axis/axis2/java/rampart/trunk/modules/rampart-samples/src/test/java/org/apache/rampart/samples/runner/Sample.java
 Sat Dec 26 09:58:12 2015
@@ -40,10 +40,15 @@ final class Sample {
         project.setUserProperty("build.dir", new File(targetDir, 
"build").getAbsolutePath());
         project.setUserProperty("client.port", String.valueOf(port));
         project.setUserProperty("server.port", String.valueOf(port));
+        StringBuilder vmargs = new StringBuilder();
+        vmargs.append("-Dlog4j.configuration=");
+        vmargs.append(new 
File("src/test/conf/log4j.properties").getAbsoluteFile().toURI().toString());
         String jacocoArgLineTemplate = 
System.getProperty("jacoco.argLineTemplate");
         if (jacocoArgLineTemplate != null) {
-            project.setUserProperty("vmargs", 
jacocoArgLineTemplate.replace("@id@", group + ":" + target));
+            vmargs.append(" ");
+            vmargs.append(jacocoArgLineTemplate.replace("@id@", group + ":" + 
target));
         }
+        project.setUserProperty("vmargs", vmargs.toString());
         ProjectHelper.configureProject(project, new File(group + 
"/build.xml"));
         project.addBuildListener(logger);
         project.executeTarget(target);


Reply via email to