You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by pm...@apache.org on 2018/01/14 13:52:05 UTC

svn commit: r1821103 - /jmeter/trunk/src/core/org/apache/jmeter/engine/StandardJMeterEngine.java

Author: pmouawad
Date: Sun Jan 14 13:52:05 2018
New Revision: 1821103

URL: http://svn.apache.org/viewvc?rev=1821103&view=rev
Log:
Improve logging

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/engine/StandardJMeterEngine.java

Modified: jmeter/trunk/src/core/org/apache/jmeter/engine/StandardJMeterEngine.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/engine/StandardJMeterEngine.java?rev=1821103&r1=1821102&r2=1821103&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/engine/StandardJMeterEngine.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/engine/StandardJMeterEngine.java Sun Jan 14 13:52:05 2018
@@ -233,7 +233,7 @@ public class StandardJMeterEngine implem
             }
         }
         if (host != null) {
-            log.info("Test has ended on host "+host);
+            log.info("Test has ended on host {} ", host);
             long now=System.currentTimeMillis();
             System.out.println("Finished the test on host " + host + " @ "+new Date(now)+" ("+now+")" // NOSONAR Intentional
                     +(EXIT_AFTER_TEST ? " - exit requested." : ""));
@@ -413,10 +413,11 @@ public class StandardJMeterEngine implem
                 AbstractThreadGroup group = setupIter.next();
                 groupCount++;
                 String groupName = group.getName();
-                log.info("Starting setUp ThreadGroup: " + groupCount + " : " + groupName);
+                log.info("Starting setUp ThreadGroup: {} : {} ", groupCount, groupName);
                 startThreadGroup(group, groupCount, setupSearcher, testLevelElements, notifier);
                 if (serialized && setupIter.hasNext()) {
-                    log.info("Waiting for setup thread group: "+groupName+" to finish before starting next setup group");
+                    log.info("Waiting for setup thread group: {} to finish before starting next setup group", 
+                            groupName);
                     group.waitThreadsStopped();
                 }
             }    
@@ -449,10 +450,10 @@ public class StandardJMeterEngine implem
             }
             groupCount++;
             String groupName = group.getName();
-            log.info("Starting ThreadGroup: " + groupCount + " : " + groupName);
+            log.info("Starting ThreadGroup: {} : {}", groupCount, groupName);
             startThreadGroup(group, groupCount, searcher, testLevelElements, notifier);
             if (serialized && iter.hasNext()) {
-                log.info("Waiting for thread group: "+groupName+" to finish before starting next group");
+                log.info("Waiting for thread group: {} to finish before starting next group", groupName);
                 group.waitThreadsStopped();
             }
         } // end of thread groups
@@ -481,10 +482,10 @@ public class StandardJMeterEngine implem
                 AbstractThreadGroup group = postIter.next();
                 groupCount++;
                 String groupName = group.getName();
-                log.info("Starting tearDown ThreadGroup: " + groupCount + " : " + groupName);
+                log.info("Starting tearDown ThreadGroup: {} : {}", groupCount, groupName);
                 startThreadGroup(group, groupCount, postSearcher, testLevelElements, notifier);
                 if (serialized && postIter.hasNext()) {
-                    log.info("Waiting for post thread group: "+groupName+" to finish before starting next post group");
+                    log.info("Waiting for post thread group: {} to finish before starting next post group", groupName);
                     group.waitThreadsStopped();
                 }
             }
@@ -509,8 +510,7 @@ public class StandardJMeterEngine implem
             boolean onErrorStopThread = group.getOnErrorStopThread();
             boolean onErrorStartNextLoop = group.getOnErrorStartNextLoop();
             String groupName = group.getName();
-            log.info("Starting " + numThreads + " threads for group " + groupName + ".");
-    
+            log.info("Starting {} threads for group {}.", numThreads, groupName);
             if (onErrorStopTest) {
                 log.info("Test will stop on error");
             } else if (onErrorStopTestNow) {
@@ -564,13 +564,13 @@ public class StandardJMeterEngine implem
     public void exit() {
         ClientJMeterEngine.tidyRMI(log); // This should be enough to allow server to exit.
         if (REMOTE_SYSTEM_EXIT) { // default is false
-            log.warn("About to run System.exit(0) on "+host);
+            log.warn("About to run System.exit(0) on {}", host);
             // Needs to be run in a separate thread to allow RMI call to return OK
             Thread t = new Thread() {
                 @Override
                 public void run() {
                     pause(1000); // Allow RMI to complete
-                    log.info("Bye from "+host);
+                    log.info("Bye from {}", host);
                     System.out.println("Bye from "+host); // NOSONAR Intentional
                     System.exit(0); // NOSONAR Intentional
                 }
@@ -589,7 +589,7 @@ public class StandardJMeterEngine implem
 
     @Override
     public void setProperties(Properties p) {
-        log.info("Applying properties "+p);
+        log.info("Applying properties {}", p);
         JMeterUtils.getJMeterProperties().putAll(p);
     }