Commit 8f44caf
authored
[DPC-4950] Add exception class to JSON log format (#2860)
## 🎫 Ticket
https://jira.cms.gov/browse/DPC-4950
## 🛠 Changes
Adds exception class to JSON log format.
## ℹ️ Context
Allows for faster log searches.
## 🧪 Validation
Test updated.
log example from smoke test:
```
{"timestamp":"2026-01-05T18:03:49.477+0000",
"level":"ERROR",
"thread":"RxComputationThreadPool-1",
"logger":"gov.cms.dpc.aggregation.engine.JobBatchProcessor",
"message":"Failed to retrieve Patient",
"exception":"ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException: No patient found with ID: \n\tat gov.cms.dpc.bluebutton.client.MockBlueButtonClient.formNoPatientException(MockBlueButtonClient.java:242)...",
"mdc":{"jobID":"e6fec28a-abe0-4906-88ad-2a738ce289b9","is_bulk":"true","organization_id":"0ab352f1-2bf1-44c4-aa7a-3004a1ffef12","aggregatorId":"fbc25203-a54e-4d88-83b5-d34134504962","batchID":"d7f12dae-db60-4d26-82ef-7f4575a14fe0","is_v2":"false"},
"environment":"local",
"application":"dpc-aggregation",
"version":"unknown_version",
"exceptionClass":"ResourceNotFoundException"}
```1 parent cb4883d commit 8f44caf
File tree
2 files changed
+14
-3
lines changed- dpc-common/src
- main/java/gov/cms/dpc/common/logging
- test/java/gov/cms/dpc/common/logging
2 files changed
+14
-3
lines changedLines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| 52 | + | |
51 | 53 | | |
52 | 54 | | |
53 | 55 | | |
54 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
55 | 62 | | |
56 | 63 | | |
57 | 64 | | |
| |||
Lines changed: 7 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
17 | | - | |
18 | | - | |
19 | 18 | | |
20 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
21 | 24 | | |
22 | 25 | | |
23 | 26 | | |
| |||
185 | 188 | | |
186 | 189 | | |
187 | 190 | | |
| 191 | + | |
188 | 192 | | |
189 | 193 | | |
190 | 194 | | |
| |||
0 commit comments