Closed as not planned
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)