martin 3 年 前
コミット
87d78694d4

+ 4 - 1
simulation-resource-common/src/main/java/com/css/simulation/resource/common/controller/KafkaController.java

@@ -28,7 +28,10 @@ public class KafkaController {
             int partition = success.getRecordMetadata().partition();
             // 消息在分区内的offset
             long offset = success.getRecordMetadata().offset();
-            log.info("发送消息成功:" + topic + "-" + partition + "-" + offset);
+            log.info("------- 发送消息成功:\n"
+                    + "主题 topic 为:" + topic + "\n"
+                    + "分区 partition 为:" + partition + "\n"
+                    + "偏移量为:" + offset);
         }, failure -> {
             log.error("发送消息失败:" + failure.getMessage());
         });

+ 5 - 2
simulation-resource-scheduler/src/main/java/com/css/simulation/resource/scheduler/consumer/ManualProjectConsumer.java

@@ -210,9 +210,12 @@ public class ManualProjectConsumer {
                 int partition = success.getRecordMetadata().partition();
                 // 消息在分区内的offset
                 long offset = success.getRecordMetadata().offset();
-                log.info("发送消息成功:" + topic + "-" + partition + "-" + offset);
+                log.info("------- 发送消息成功:\n"
+                        + "主题 topic 为:" + topic + "\n"
+                        + "分区 partition 为:" + partition + "\n"
+                        + "偏移量为:" + offset);
             }, failure -> {
-                log.error("发送消息失败:" + failure.getMessage());
+                log.error("------- 发送消息失败:" + failure.getMessage());
             });
         }