vlsi commented on code in PR #6306:
URL: https://github.com/apache/jmeter/pull/6306#discussion_r1705186336


##########
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: %s. Uses tearDownTest: %b", name, 
isToBeRegistered);

Review Comment:
   slf4j uses `{}` placeholders rather than `%..` ones.
   
   ```suggestion
               log.info("Created class: {}. Uses tearDownTest: {}", name, 
isToBeRegistered);
   ```



##########
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: %s. Uses tearDownTest: %b", name, 
isToBeRegistered);
         } catch (Exception e) {
-            log.error("{}\tException initialising: ", whoAmI(), name, e);
+            log.error("%s\tException initialising: %s %s", whoAmI(), name, 
e.getMessage());

Review Comment:
   ```suggestion
               log.error("{}\tException initialising: {} {}", whoAmI(), name, 
e.getMessage());
   ```



-- 
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: dev-unsubscr...@jmeter.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to