Commit a0040eb
committed
Print RuntimeException raised by
Before this commit, runtime exception is swallowed silently.
For example, if two `StructuredLoggingJsonMembersCustomizer` add same key, exception is printed now:
```
Exception in thread "main" java.lang.IllegalStateException: The name 'test' has already been written
at org.springframework.util.Assert.state(Assert.java:101)
at org.springframework.boot.json.JsonValueWriter.writePair(JsonValueWriter.java:228)
at org.springframework.boot.json.JsonValueWriter.write(JsonValueWriter.java:83)
at org.springframework.boot.json.JsonWriter$Member.write(JsonWriter.java:650)
at org.springframework.boot.json.JsonWriter$Members.write(JsonWriter.java:339)
```StructuredLogFormatter::format to system err1 parent 3ddfd62 commit a0040eb
File tree
1 file changed
+17
-2
lines changed- spring-boot-project/spring-boot/src/main/java/org/springframework/boot/logging/structured
1 file changed
+17
-2
lines changedLines changed: 17 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| |||
68 | 69 | | |
69 | 70 | | |
70 | 71 | | |
71 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
72 | 80 | | |
73 | 81 | | |
74 | 82 | | |
75 | 83 | | |
76 | | - | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
77 | 92 | | |
78 | 93 | | |
79 | 94 | | |
0 commit comments