nodece commented on code in PR #25536:
URL: https://github.com/apache/pulsar/pull/25536#discussion_r3091365455
##########
pulsar-broker/src/test/java/org/apache/pulsar/broker/transaction/TransactionProduceTest.java:
##########
@@ -183,7 +182,7 @@ private void produceTest(boolean endAction) throws
Exception {
}
Assert.assertEquals(0, messageSet.size());
- log.info("produce and {} test finished.", endAction ? "commit" :
"abort");
+ log.info().attr("produceAnd", endAction ? "commit" :
"abort").log("produce and test finished.");
Review Comment:
**`"produceAnd"` is a partial verb phrase from the message text, not a name
for the `endAction` value.**
```suggestion
log.info().attr("endAction", endAction ? "commit" :
"abort").log("produce and commit/abort test finished");
```
##########
pulsar-broker/src/test/java/org/apache/pulsar/client/api/PartitionedProducerConsumerTest.java:
##########
@@ -76,7 +75,7 @@ public void cleanupExecutor() throws Exception {
@Test(timeOut = 30000)
public void testRoundRobinProducer() throws Exception {
- log.info("-- Starting {} test --", methodName);
+ log.info().attr("starting", methodName).log("-- Starting test");
Review Comment:
**`"starting"` and `"exiting"` are adjectives/verbs from the message text,
not names for `methodName` value. This repeats 24+ times in the file.**
```suggestion
log.info().attr("testMethod", methodName).log("Starting test");
```
Same for all `attr("exiting", methodName)` → `attr("testMethod",
methodName)`.
--
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]