- Notifications
You must be signed in to change notification settings - Fork 41.6k
Closed as not planned
Closed as not planned
Copy link
Labels
status: supersededAn issue that has been superseded by anotherAn issue that has been superseded by anothertype: bugA general bugA general bug
Description
Structured logging has infinite loop and throws StackOverflowError when attempting to log a Path object.
Tested with spring-boot 3.4.3 and latest 3.5.0-SNAPSHOT.
Example code:
System.setProperty("logging.structured.format.console", "logstash"); SpringApplication.run(DemoApplication.class, args); LoggerFactory.getLogger(DemoApplication.class).atInfo() .addKeyValue("foo", Path.of("bar")) .log("test");
Exception:
Exception in thread "main" java.lang.StackOverflowError ... at org.springframework.boot.json.JsonValueWriter.append(JsonValueWriter.java:282) at org.springframework.boot.json.JsonValueWriter.start(JsonValueWriter.java:144) at org.springframework.boot.json.JsonValueWriter.writeArray(JsonValueWriter.java:168) at org.springframework.boot.json.JsonValueWriter.write(JsonValueWriter.java:118) at org.springframework.boot.json.JsonValueWriter.writeElement(JsonValueWriter.java:190)
Metadata
Metadata
Assignees
Labels
status: supersededAn issue that has been superseded by anotherAn issue that has been superseded by anothertype: bugA general bugA general bug