"Skipping resubmission" log message uses `%s` placeholders with SLF4J

Đang mở Phù hợp với người mới
#1,983 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@fhrmrk đang làm issue này rồi.

Từ ngày 5/11/2026.

  • #1985 của @rocky-bgta — đã đóng, không merge
  • #1986 của @rocky-bgta — đã đóng, không merge
  • #1993 của @fhrmrk — đang mở

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
85/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
java, spring-boot
Lĩnh vực
backend

Hướng nghiên cứu

Tìm DefaultEventPublicationRegistry.processFailedPublications(…) và so sánh lệnh gọi ghi log bị ảnh hưởng với thông báo gửi lại ở gần đó được đề cập trong issue. Xác nhận rằng đầu ra hiển thị hai giá trị thay vì các phần giữ chỗ theo nghĩa đen; issue đưa ra cách tái hiện và đầu ra mong đợi, nhưng không nêu tên tệp kiểm thử nào.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

DefaultEventPublicationRegistry.processFailedPublications(…) logs with %s placeholders through SLF4J, which only understands {}, so the values are never shown:

LOGGER.info("Skipping resubmission as only %s should be resubmitted in parallel and currently %s are.",
		options.getMaxInFlight(), currentlyResubmitted);

Affects 2.1.2; the line is the same on main. GH-1565 recently moved the resubmission debug message of the same class to {} placeholders.

Reproducer

Spring Modulith 2.1.2 with slf4j-simple, on JDK 25: java -cp <spring-modulith-events-core and its dependencies> SkippingResubmissionLog.java

import java.lang.reflect.Proxy;
import java.time.Clock;

import org.springframework.modulith.events.ResubmissionOptions;
import org.springframework.modulith.events.core.DefaultEventPublicationRegistry;
import org.springframework.modulith.events.core.EventPublicationRepository;

public class SkippingResubmissionLog {

	public static void main(String[] args) {

		// A repository in which 3 publications are currently being resubmitted
		EventPublicationRepository repository = (EventPublicationRepository) Proxy.newProxyInstance(
				EventPublicationRepository.class.getClassLoader(), new Class<?>[] { EventPublicationRepository.class },
				(proxy, method, arguments) -> method.getName().equals("countByStatus") ? 3 : null);

		new DefaultEventPublicationRegistry(repository, Clock.systemUTC())
				.processFailedPublications(ResubmissionOptions.defaults().withMaxInFlight(3), publication -> {});
	}

}

Output:

[main] INFO org.springframework.modulith.events.core.DefaultEventPublicationRegistry - Skipping resubmission as only %s should be resubmitted in parallel and currently %s are.

With {} instead of %s on top of 2.1.2, it prints Skipping resubmission as only 3 should be resubmitted in parallel and currently 3 are.

Ngôn ngữ chính
Java
Star
1.2k
Fork
239
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của spring-projects/spring-modulith

Tất cả issue của spring-projects/spring-modulith

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.