jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fschumac...@apache.org
Subject [jmeter] 01/02: Use string format in log messages
Date Sun, 29 Sep 2019 10:17:11 GMT
This is an automated email from the ASF dual-hosted git repository.

fschumacher pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jmeter.git

commit 5eb8495e5fa77925950c39f6057e9454ad8b67ef
Author: Felix Schumacher <felix.schumacher@internetallee.de>
AuthorDate: Sun Sep 29 12:00:04 2019 +0200

    Use string format in log messages
---
 .../org/apache/jmeter/util/BeanShellTestElement.java   | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/core/src/main/java/org/apache/jmeter/util/BeanShellTestElement.java b/src/core/src/main/java/org/apache/jmeter/util/BeanShellTestElement.java
index c681710..76c97f9 100644
--- a/src/core/src/main/java/org/apache/jmeter/util/BeanShellTestElement.java
+++ b/src/core/src/main/java/org/apache/jmeter/util/BeanShellTestElement.java
@@ -78,7 +78,7 @@ public abstract class BeanShellTestElement extends AbstractTestElement
             try {
                 bshInterpreter.reset();
             } catch (ClassNotFoundException e) {
-                log.error("Cannot reset BeanShell: "+e.toString());
+                log.error("Cannot reset BeanShell: {}", e.toString());
             }
         }
 
@@ -92,7 +92,7 @@ public abstract class BeanShellTestElement extends AbstractTestElement
             bshInterpreter.set("props", JMeterUtils.getJMeterProperties());
             bshInterpreter.set("vars", vars);//$NON-NLS-1$
         } catch (JMeterException e) {
-            log.warn("Problem setting one or more BeanShell variables "+e);
+            log.warn("Problem setting one or more BeanShell variables {}", e.toString());
         }
         return bshInterpreter;
     }
@@ -106,7 +106,7 @@ public abstract class BeanShellTestElement extends AbstractTestElement
             hasInitFile = initFileName != null;
             bshInterpreter = new BeanShellInterpreter(initFileName, log);
         } catch (ClassNotFoundException e) {
-            log.error("Cannot find BeanShell: "+e.toString());
+            log.error("Cannot find BeanShell: {}", e.toString());
         }
     }
 
@@ -184,7 +184,7 @@ public abstract class BeanShellTestElement extends AbstractTestElement
             bshInterpreter.evalNoLog("threadStarted()"); // $NON-NLS-1$
         } catch (JMeterException e) {
             if (log.isDebugEnabled()) {
-                log.debug(getClass().getName() + " : " + e.getLocalizedMessage()); // $NON-NLS-1$
+                log.debug("{} : {}", getClass().getName(), e.getLocalizedMessage()); // $NON-NLS-1$
             }
         }
     }
@@ -198,7 +198,7 @@ public abstract class BeanShellTestElement extends AbstractTestElement
             bshInterpreter.evalNoLog("threadFinished()"); // $NON-NLS-1$
         } catch (JMeterException e) {
             if (log.isDebugEnabled()) {
-                log.debug(getClass().getName() + " : " + e.getLocalizedMessage()); // $NON-NLS-1$
+                log.debug("{} : {}", getClass().getName(), e.getLocalizedMessage()); // $NON-NLS-1$
             }
         }
     }
@@ -212,7 +212,7 @@ public abstract class BeanShellTestElement extends AbstractTestElement
             bshInterpreter.evalNoLog("testEnded()"); // $NON-NLS-1$
         } catch (JMeterException e) {
             if (log.isDebugEnabled()) {
-                log.debug(getClass().getName() + " : " + e.getLocalizedMessage()); // $NON-NLS-1$
+                log.debug("{} : {}", getClass().getName(), e.getLocalizedMessage()); // $NON-NLS-1$
             }
         }
     }
@@ -226,7 +226,7 @@ public abstract class BeanShellTestElement extends AbstractTestElement
             bshInterpreter.eval("testEnded(\"" + host + "\")");
         } catch (JMeterException e) {
             if (log.isDebugEnabled()) {
-                log.debug(getClass().getName() + " : " + e.getLocalizedMessage()); // $NON-NLS-1$
+                log.debug("{} : {}", getClass().getName(), e.getLocalizedMessage()); // $NON-NLS-1$
             }
         }
     }
@@ -240,7 +240,7 @@ public abstract class BeanShellTestElement extends AbstractTestElement
             bshInterpreter.evalNoLog("testStarted()"); // $NON-NLS-1$
         } catch (JMeterException e) {
             if (log.isDebugEnabled()) {
-                log.debug(getClass().getName() + " : " + e.getLocalizedMessage()); // $NON-NLS-1$
+                log.debug("{} : {}", getClass().getName(), e.getLocalizedMessage()); // $NON-NLS-1$
             }
         }
     }
@@ -254,7 +254,7 @@ public abstract class BeanShellTestElement extends AbstractTestElement
             bshInterpreter.eval("testStarted(\"" + host + "\")");
         } catch (JMeterException e) {
             if (log.isDebugEnabled()) {
-                log.debug(getClass().getName() + " : " + e.getLocalizedMessage()); // $NON-NLS-1$
+                log.debug("{} : {}", getClass().getName(), e.getLocalizedMessage()); // $NON-NLS-1$
             }
         }
     }


Mime
View raw message