Commit ecfdb7f
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 ecfdb7f
File tree
2 files changed
+26
-3
lines changed- spring-boot-project/spring-boot/src/main/java/org/springframework/boot/logging
- log4j2
- logback
2 files changed
+26
-3
lines changedLines changed: 17 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
| |||
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
61 | | - | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
62 | 70 | | |
63 | 71 | | |
64 | 72 | | |
65 | 73 | | |
66 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
67 | 82 | | |
68 | 83 | | |
69 | 84 | | |
| |||
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| |||
124 | 125 | | |
125 | 126 | | |
126 | 127 | | |
127 | | - | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
128 | 136 | | |
129 | 137 | | |
130 | 138 | | |
| |||
0 commit comments