vlsi commented on code in PR #6306:
URL: https://github.com/apache/jmeter/pull/6306#discussion_r1863316999
##########
src/protocol/java/src/main/java/org/apache/jmeter/protocol/java/sampler/JavaSampler.java:
##########
@@ -121,9 +121,9 @@ private void initClass() {
javaClass = Class.forName(name, false,
Thread.currentThread().getContextClassLoader());
Method method = javaClass.getMethod("teardownTest",
JavaSamplerContext.class);
isToBeRegistered =
!method.getDeclaringClass().equals(AbstractJavaSamplerClient.class);
- log.info("Created class: {}. Uses tearDownTest: ", name,
isToBeRegistered);
+ log.info("Created class: {}. Uses tearDownTest: {}", name,
isToBeRegistered);
} catch (Exception e) {
- log.error("{}\tException initialising: ", whoAmI(), name, e);
+ log.error("{}\tException initialising: {} {}", whoAmI(), name, e);
Review Comment:
The exception should not be among the placeholders.
If you add a placeholder for the exception, then then the logger prints only
the exception class.
If you omit the placeholder for the exception, then the logger prints the
full stacktrace
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]