-
-
Notifications
You must be signed in to change notification settings - Fork 168
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added the ability to log Flow record collections (#171)
* Refactored FlowLogEntry and FlowRecordLogEntry to use new FlowLogger class for shared logic * Added FlowCollectionLogEntry class * Updated docs * Small bugfix for dealing with List<SObject> & SObjectType in LogEntryEventBuilder * Added a bit more Flow details to README.md * Bumped package version & promoted new package version
- Loading branch information
Showing
31 changed files
with
755 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
--- | ||
layout: default | ||
--- | ||
|
||
## FlowCollectionLogEntry class | ||
|
||
Handles adding new log entries in Flow for a particular `SObject` record collection | ||
|
||
### Related | ||
|
||
[FlowLogEntry](FlowLogEntry) | ||
|
||
[FlowRecordLogEntry](FlowRecordLogEntry) | ||
|
||
[FlowLogger](FlowLogger) | ||
|
||
[Logger](Logger) | ||
|
||
[LogEntryEventBuilder](LogEntryEventBuilder) | ||
|
||
--- | ||
|
||
### Properties | ||
|
||
#### `faultMessage` → `String` | ||
|
||
Optionally log a Flow fault error message | ||
|
||
#### `flowName` → `String` | ||
|
||
The name of the Flow creating the log entry. Due to Salesforce limitations, this cannot be automatically determined | ||
|
||
#### `loggingLevelName` → `String` | ||
|
||
Optionally specify a logging level - the default is 'DEBUG' | ||
|
||
#### `message` → `String` | ||
|
||
The message to log | ||
|
||
#### `records` → `List<SObject>` | ||
|
||
The records to relate to this log entry - the records' JSON is automatically added to the log entry | ||
|
||
#### `saveLog` → `Boolean` | ||
|
||
Optionally choose to save any pending log entries | ||
|
||
#### `timestamp` → `DateTime` | ||
|
||
#### `topics` → `List<String>` | ||
|
||
Optionally provide a list of topics to dynamically assign to the log entry | ||
|
||
--- | ||
|
||
### Methods | ||
|
||
#### `addFlowCollectionEntries(List<FlowCollectionLogEntry> flowCollectionLogEntries)` → `List<String>` | ||
|
||
addFlowRecordEntries description | ||
|
||
##### Parameters | ||
|
||
| Param | Description | | ||
| ---------------------- | ------------------------------------------------ | | ||
| `flowRecordLogEntries` | The list of FlowRecordLogEntry instances to save | | ||
|
||
##### Return | ||
|
||
**Type** | ||
|
||
List<String> | ||
|
||
**Description** | ||
|
||
The current transaction's ID (based on `Logger.getTransactionId()`) | ||
|
||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
--- | ||
layout: default | ||
--- | ||
|
||
## FlowLogger class | ||
|
||
Handles some common logic used by `FlowLogEntry`, `FlowRecordLogEntry` and `FlowCollectionLogEntry` | ||
|
||
### Related | ||
|
||
[FlowLogEntry](FlowLogEntry) | ||
|
||
[FlowRecordLogEntry](FlowRecordLogEntry) | ||
|
||
[FlowCollectionLogEntry](FlowCollectionLogEntry) | ||
|
||
[Logger](Logger) | ||
|
||
[LogEntryEventBuilder](LogEntryEventBuilder) | ||
|
||
--- | ||
|
||
### Methods | ||
|
||
#### `addEntries(List<LogEntry> flowEntries)` → `List<String>` | ||
|
||
--- | ||
|
||
### Inner Classes | ||
|
||
#### FlowLogger.LogEntry class | ||
|
||
--- | ||
|
||
##### Properties | ||
|
||
###### `faultMessage` → `String` | ||
|
||
###### `flowName` → `String` | ||
|
||
###### `loggingLevelName` → `String` | ||
|
||
###### `message` → `String` | ||
|
||
###### `saveLog` → `Boolean` | ||
|
||
###### `timestamp` → `DateTime` | ||
|
||
###### `topics` → `List<String>` | ||
|
||
--- | ||
|
||
##### Methods | ||
|
||
###### `addToLoggerBuffer()` → `LogEntryEventBuilder` | ||
|
||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
nebula-logger/main/log-management/permissionsets/LoggerEndUser.permissionset-meta.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.