Commit c09e2f9
Adjust GcpLayout JSON to latest format (#3586)
* Adjust GcpLayout JSON to latest format
First, it formats the log timestamp field to the correct format
recognized by Fluent-Bit (component of Google Cloud Logging) and Google
Ops Agent.
Secondly, severity field now must be prefixed with
logging.googleapis.com.
Third, counter cannot be used for insertId as it is duplicated on
different threads.
And the last but not the least, exception, thread and logger fields are
pretty standard when logging via Logback's JSON layout and Google's
Spring GCP libraries. Field name changes now match these other loggers.
* revert severity changes, remove insertId
* Remove insertid from tests
* fix spotless error
* Switch exception field to use exception resolver
* try to fix timestamp tests
* Fix tests with empty exceptions
* Add changelog
* Improve changelog.
---------
Co-authored-by: Volkan Yazıcı <[email protected]>1 parent ebfc571 commit c09e2f9
File tree
2 files changed
+23
-59
lines changed- log4j-layout-template-json-test/src/test/java/org/apache/logging/log4j/layout/template/json
- log4j-layout-template-json/src/main/resources
2 files changed
+23
-59
lines changedLines changed: 7 additions & 37 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | 23 | | |
29 | 24 | | |
30 | 25 | | |
| |||
43 | 38 | | |
44 | 39 | | |
45 | 40 | | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | 41 | | |
50 | 42 | | |
51 | 43 | | |
| |||
83 | 75 | | |
84 | 76 | | |
85 | 77 | | |
86 | | - | |
87 | | - | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
88 | 81 | | |
89 | 82 | | |
90 | 83 | | |
| |||
147 | 140 | | |
148 | 141 | | |
149 | 142 | | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | 143 | | |
154 | 144 | | |
155 | 145 | | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | 146 | | |
165 | | - | |
| 147 | + | |
166 | 148 | | |
167 | 149 | | |
168 | 150 | | |
169 | 151 | | |
170 | 152 | | |
171 | 153 | | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
| 154 | + | |
178 | 155 | | |
179 | 156 | | |
180 | 157 | | |
181 | | - | |
| 158 | + | |
182 | 159 | | |
183 | 160 | | |
184 | | - | |
| 161 | + | |
185 | 162 | | |
186 | 163 | | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | 164 | | |
Lines changed: 16 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
8 | 13 | | |
9 | 14 | | |
10 | 15 | | |
| |||
36 | 41 | | |
37 | 42 | | |
38 | 43 | | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
| |||
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
61 | 56 | | |
62 | | - | |
63 | | - | |
| 57 | + | |
64 | 58 | | |
65 | 59 | | |
66 | | - | |
| 60 | + | |
67 | 61 | | |
68 | 62 | | |
69 | 63 | | |
70 | | - | |
| 64 | + | |
71 | 65 | | |
72 | 66 | | |
73 | 67 | | |
| |||
0 commit comments