Commit 8910fcb
committed
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.1 parent 4d598e0 commit 8910fcb
File tree
2 files changed
+24
-40
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
+24
-40
lines changedLines changed: 5 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
152 | | - | |
| 152 | + | |
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | 157 | | |
166 | | - | |
| 158 | + | |
167 | 159 | | |
168 | 160 | | |
169 | 161 | | |
170 | 162 | | |
171 | 163 | | |
172 | 164 | | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
| 165 | + | |
178 | 166 | | |
179 | 167 | | |
180 | 168 | | |
181 | 169 | | |
182 | | - | |
| 170 | + | |
183 | 171 | | |
184 | 172 | | |
185 | | - | |
| 173 | + | |
186 | 174 | | |
187 | 175 | | |
188 | 176 | | |
| |||
Lines changed: 19 additions & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
8 | 7 | | |
9 | 8 | | |
10 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
11 | 16 | | |
12 | 17 | | |
13 | 18 | | |
| |||
37 | 42 | | |
38 | 43 | | |
39 | 44 | | |
40 | | - | |
41 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
42 | 48 | | |
43 | 49 | | |
44 | 50 | | |
| |||
49 | 55 | | |
50 | 56 | | |
51 | 57 | | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
65 | 61 | | |
66 | | - | |
| 62 | + | |
67 | 63 | | |
68 | 64 | | |
69 | 65 | | |
70 | | - | |
| 66 | + | |
71 | 67 | | |
72 | 68 | | |
73 | 69 | | |
| |||
0 commit comments