Skip to content

Commit 6a6c556

Browse files
TrangOuljongpiejamessimone
authored
Approval results logging (#850)
Added new setApprovalResult() methods in LogEntryEventBuilder for logging instances of the standard Apex classes Approval.LockResult, Approval.ProcessResult, Approval.UnlockResult, as well as lists of each class Co-authored-by: Jonathan Gillespie <jonathan.c.gillespie@gmail.com> Co-authored-by: James Simone <16430727+jamessimone@users.noreply.github.com>
1 parent ec2cfe8 commit 6a6c556

File tree

14 files changed

+771
-184
lines changed

14 files changed

+771
-184
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55

66
The most robust observability solution for Salesforce experts. Built 100% natively on the platform, and designed to work seamlessly with Apex, Lightning Components, Flow, OmniStudio, and integrations.
77

8-
## Unlocked Package - v4.15.9
8+
## Unlocked Package - v4.15.10
99

10-
[![Install Unlocked Package in a Sandbox](./images/btn-install-unlocked-package-sandbox.png)](https://test.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000015pGKQAY)
11-
[![Install Unlocked Package in Production](./images/btn-install-unlocked-package-production.png)](https://login.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000015pGKQAY)
10+
[![Install Unlocked Package in a Sandbox](./images/btn-install-unlocked-package-sandbox.png)](https://test.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000015pGeQAI)
11+
[![Install Unlocked Package in Production](./images/btn-install-unlocked-package-production.png)](https://login.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000015pGeQAI)
1212
[![View Documentation](./images/btn-view-documentation.png)](https://github.com/jongpie/NebulaLogger/wiki)
1313

14-
`sf package install --wait 20 --security-type AdminsOnly --package 04t5Y0000015pGKQAY`
14+
`sf package install --wait 20 --security-type AdminsOnly --package 04t5Y0000015pGeQAI`
1515

1616
---
1717

docs/apex/Logger-Engine/LogEntryEventBuilder.md

Lines changed: 128 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ Used by `Logger` to instantiate a new instance of `LogEntryEventBuilder`
3030

3131
### Properties
3232

33+
#### `ENTRY_SAVE_REASON_LOGGING_LEVEL_MET``String`
34+
35+
#### `ENTRY_SAVE_REASON_OVERRIDE``String`
36+
3337
#### `aggregateQueriesMax``Integer`
3438

3539
#### `asyncCallsMax``Integer`
@@ -140,6 +144,126 @@ LogEntryEventBuilder
140144

141145
The same instance of `LogEntryEventBuilder`, useful for chaining methods
142146

147+
#### `setApprovalResult(Approval.LockResult lockResult)``LogEntryEventBuilder`
148+
149+
Sets the log entry event&apos;s database operation result fields
150+
151+
##### Parameters
152+
153+
| Param | Description |
154+
| ------------ | -------------------------------------------- |
155+
| `lockResult` | The instance of `Approval.LockResult` to log |
156+
157+
##### Return
158+
159+
**Type**
160+
161+
LogEntryEventBuilder
162+
163+
**Description**
164+
165+
The same instance of `LogEntryEventBuilder`, useful for chaining methods
166+
167+
#### `setApprovalResult(Approval.ProcessResult processResult)``LogEntryEventBuilder`
168+
169+
Sets the log entry event&apos;s database operation result fields
170+
171+
##### Parameters
172+
173+
| Param | Description |
174+
| --------------- | ----------------------------------------------- |
175+
| `processResult` | The instance of `Approval.ProcessResult` to log |
176+
177+
##### Return
178+
179+
**Type**
180+
181+
LogEntryEventBuilder
182+
183+
**Description**
184+
185+
The same instance of `LogEntryEventBuilder`, useful for chaining methods
186+
187+
#### `setApprovalResult(Approval.UnlockResult unlockResult)``LogEntryEventBuilder`
188+
189+
Sets the log entry event&apos;s database operation result fields
190+
191+
##### Parameters
192+
193+
| Param | Description |
194+
| -------------- | ---------------------------------------------- |
195+
| `unlockResult` | The instance of `Approval.UnlockResult` to log |
196+
197+
##### Return
198+
199+
**Type**
200+
201+
LogEntryEventBuilder
202+
203+
**Description**
204+
205+
The same instance of `LogEntryEventBuilder`, useful for chaining methods
206+
207+
#### `setApprovalResult(List<Approval.LockResult> lockResults)``LogEntryEventBuilder`
208+
209+
Sets the log entry event&apos;s database operation result fields
210+
211+
##### Parameters
212+
213+
| Param | Description |
214+
| ------------- | -------------------------------------------------- |
215+
| `lockResults` | The list of `Approval.LockResult` instances to log |
216+
217+
##### Return
218+
219+
**Type**
220+
221+
LogEntryEventBuilder
222+
223+
**Description**
224+
225+
The same instance of `LogEntryEventBuilder`, useful for chaining methods
226+
227+
#### `setApprovalResult(List<Approval.ProcessResult> processResults)``LogEntryEventBuilder`
228+
229+
Sets the log entry event&apos;s database operation result fields
230+
231+
##### Parameters
232+
233+
| Param | Description |
234+
| ---------------- | ----------------------------------------------------- |
235+
| `processResults` | The list of `Approval.ProcessResult` instances to log |
236+
237+
##### Return
238+
239+
**Type**
240+
241+
LogEntryEventBuilder
242+
243+
**Description**
244+
245+
The same instance of `LogEntryEventBuilder`, useful for chaining methods
246+
247+
#### `setApprovalResult(List<Approval.UnlockResult> unlockResults)``LogEntryEventBuilder`
248+
249+
Sets the log entry event&apos;s database operation result fields
250+
251+
##### Parameters
252+
253+
| Param | Description |
254+
| --------------- | ---------------------------------------------------- |
255+
| `unlockResults` | The list of `Approval.UnlockResult` instances to log |
256+
257+
##### Return
258+
259+
**Type**
260+
261+
LogEntryEventBuilder
262+
263+
**Description**
264+
265+
The same instance of `LogEntryEventBuilder`, useful for chaining methods
266+
143267
#### `setDatabaseResult(Database.DeleteResult deleteResult)``LogEntryEventBuilder`
144268

145269
Sets the log entry event&apos;s database operation result fields
@@ -306,9 +430,9 @@ Sets the log entry event&apos;s database operation result fields
306430

307431
##### Parameters
308432

309-
| Param | Description |
310-
| ------------------------ | ---------------------------------------------------- |
311-
| `emptyRecycleBinResults` | The list of `Database.EmptyRecycleBinResult`s to log |
433+
| Param | Description |
434+
| ------------------------ | ------------------------------------------------------------- |
435+
| `emptyRecycleBinResults` | The list of `Database.EmptyRecycleBinResult` instances to log |
312436

313437
##### Return
314438

@@ -672,7 +796,7 @@ LogEntryEventBuilder
672796

673797
The same instance of `LogEntryEventBuilder`, useful for chaining methods
674798

675-
#### `setRecord(System.Iterable<Id> recordsIds)``LogEntryEventBuilder`
799+
#### `setRecord(System.Iterable<Id> recordIds)``LogEntryEventBuilder`
676800

677801
Sets the log entry event&apos;s record fields
678802

0 commit comments

Comments
 (0)