You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by fs...@apache.org on 2019/09/29 10:17:11 UTC
[jmeter] 01/02: Use string format in log messages
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 <fe...@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$
}
}
}