diff --git a/README.md b/README.md index 691f427fb..9c4549cef 100644 --- a/README.md +++ b/README.md @@ -7,8 +7,8 @@ Designed for Salesforce admins, developers & architects. A robust logger for Ape ## Unlocked Package - v4.7.1 -[![Install Unlocked Package in a Sandbox](./images/btn-install-unlocked-package-sandbox.png)](https://test.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000015lXSQAY) -[![Install Unlocked Package in Production](./images/btn-install-unlocked-package-production.png)](https://login.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000015lXSQAY) +[![Install Unlocked Package in a Sandbox](./images/btn-install-unlocked-package-sandbox.png)](https://test.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000015lYaQAI) +[![Install Unlocked Package in Production](./images/btn-install-unlocked-package-production.png)](https://login.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000015lYaQAI) [![View Documentation](./images/btn-view-documentation.png)](https://jongpie.github.io/NebulaLogger/) ## Managed Package - v4.7.0 diff --git a/docs/apex/index.md b/docs/apex/index.md index a59dce2ed..271e5995e 100644 --- a/docs/apex/index.md +++ b/docs/apex/index.md @@ -38,6 +38,12 @@ Provides the ability to generate string messages on demand, using String.format( The core class for logging +## Miscellaneous + +### [FailureCalloutMock](/Miscellaneous/FailureCalloutMock) + +Inner class for handling mock HTTP callouts that should end in errors / exceptions. + ## Log Management ### [LogBatchPurgeScheduler](log-management/LogBatchPurgeScheduler) @@ -96,6 +102,20 @@ Handles trigger events for the `LoggerTag__c` object Controller class for the lightning web component `related-log-entries` +## Plugins + +### [LogEntryArchiveBuilder](plugins/LogEntryArchiveBuilder) + +Optional plugin that provides a BigObject, `LogEntryArchive__b`, as an alternative option to the platform event `LogEntryEvent__e` + +### [LogRetentionRulesPlugin](plugins/LogRetentionRulesPlugin) + +Optional plugin that adds the ability to create & deploy advanced, configurable rules for setting the retention date of `Log__c` records, using custom metadata types `LogRetentionRule_t` and `LogRetentionRuleCondition_t`. + +### [SlackLoggerPlugin](plugins/SlackLoggerPlugin) + +Optional plugin that integrates with Slack to send alerts for important logs + ## Configuration ### [LoggerEmailUtils](configuration/LoggerEmailUtils) diff --git a/docs/apex/log-management/LogEntryEventHandler.md b/docs/apex/log-management/LogEntryEventHandler.md index d75bdd699..a3ef0c8dd 100644 --- a/docs/apex/log-management/LogEntryEventHandler.md +++ b/docs/apex/log-management/LogEntryEventHandler.md @@ -8,6 +8,25 @@ Processes `LogEntryEvent__e` platform events and normalizes the data into `Log__ --- +### Constructors + +#### `LogEntryEventHandler()` + +Default constructor, used by the trigger `LogEntryEvent.trigger` + +#### `LogEntryEventHandler(TriggerOperation triggerOperationType, List logEntryEvents)` + +Additional constructor specific to `LogEntryEvent__e`, used in `Logger` to simulate a `BEFORE_INSERT` context + +##### Parameters + +| Param | Description | +| ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | +| `triggerOperationType` | The instance of `TriggerOperation` that the handler class should use - this overrides the `TriggerOperation` provided by `LoggerSObjectHandler` | +| `logEntryEvents` | The list of `LogEntryEvent__e` records in Logger's buffer | + +--- + ### Properties #### `releaseNumber` → `String` @@ -70,6 +89,20 @@ Schema.SObjectField The instance of `Schema.SObjectField` on `LoggerPlugin_t` for the current `SObjectType` +#### `getHandlerPluginSortField()` → `Schema.SObjectField` + +Returns the `SObjectField` on `LoggerPlugin_t` that controls the sorting of plugins for the handler's `SObjectType` + +##### Return + +**Type** + +Schema.SObjectField + +**Description** + +The instance of `Schema.SObjectField` on `LoggerPlugin_t` for the current `SObjectType` + #### `getSObjectType()` → `SObjectType` Returns SObject Type that the handler is responsible for processing diff --git a/docs/apex/log-management/LogEntryHandler.md b/docs/apex/log-management/LogEntryHandler.md index 53aee071e..11db02a0a 100644 --- a/docs/apex/log-management/LogEntryHandler.md +++ b/docs/apex/log-management/LogEntryHandler.md @@ -38,6 +38,20 @@ Schema.SObjectField The instance of `Schema.SObjectField` on `LoggerPlugin_t` for the current `SObjectType` +#### `getHandlerPluginSortField()` → `Schema.SObjectField` + +Returns the `SObjectField` on `LoggerPlugin_t` that controls the sorting of plugins for the handler's `SObjectType` + +##### Return + +**Type** + +Schema.SObjectField + +**Description** + +The instance of `Schema.SObjectField` on `LoggerPlugin_t` for the current `SObjectType` + #### `getSObjectType()` → `SObjectType` Returns SObject Type that the handler is responsible for processing diff --git a/docs/apex/log-management/LogEntryTagHandler.md b/docs/apex/log-management/LogEntryTagHandler.md index 7abe7dac5..dfd72ea2b 100644 --- a/docs/apex/log-management/LogEntryTagHandler.md +++ b/docs/apex/log-management/LogEntryTagHandler.md @@ -38,6 +38,20 @@ Schema.SObjectField The instance of `Schema.SObjectField` on `LoggerPlugin_t` for the current `SObjectType` +#### `getHandlerPluginSortField()` → `Schema.SObjectField` + +Returns the `SObjectField` on `LoggerPlugin_t` that controls the sorting of plugins for the handler's `SObjectType` + +##### Return + +**Type** + +Schema.SObjectField + +**Description** + +The instance of `Schema.SObjectField` on `LoggerPlugin_t` for the current `SObjectType` + #### `getSObjectType()` → `SObjectType` Returns SObject Type that the handler is responsible for processing diff --git a/docs/apex/log-management/LogHandler.md b/docs/apex/log-management/LogHandler.md index 4bc392da7..a956af3cd 100644 --- a/docs/apex/log-management/LogHandler.md +++ b/docs/apex/log-management/LogHandler.md @@ -38,6 +38,20 @@ Schema.SObjectField The instance of `Schema.SObjectField` on `LoggerPlugin_t` for the current `SObjectType` +#### `getHandlerPluginSortField()` → `Schema.SObjectField` + +Returns the `SObjectField` on `LoggerPlugin_t` that controls the sorting of plugins for the handler's `SObjectType` + +##### Return + +**Type** + +Schema.SObjectField + +**Description** + +The instance of `Schema.SObjectField` on `LoggerPlugin_t` for the current `SObjectType` + #### `getSObjectType()` → `SObjectType` Returns SObject Type that the handler is responsible for processing diff --git a/docs/apex/log-management/LoggerSObjectHandler.md b/docs/apex/log-management/LoggerSObjectHandler.md index 7d0c737be..599f90f81 100644 --- a/docs/apex/log-management/LoggerSObjectHandler.md +++ b/docs/apex/log-management/LoggerSObjectHandler.md @@ -48,6 +48,20 @@ Schema.SObjectField The instance of `Schema.SObjectField` on `LoggerPlugin_t` for the current `SObjectType` +#### `getHandlerPluginSortField()` → `Schema.SObjectField` + +Returns the `SObjectField` on `LoggerPlugin_t` that controls the sorting of plugins for the handler's `SObjectType` + +##### Return + +**Type** + +Schema.SObjectField + +**Description** + +The instance of `Schema.SObjectField` on `LoggerPlugin_t` for the current `SObjectType` + #### `getSObjectType()` → `Schema.SObjectType` Returns the SObject Type that the handler is responsible for processing @@ -82,8 +96,6 @@ Class used by the logging system to for trigger context details ###### `triggerNewMap` → `Map` -###### `triggerOld` → `List` - ###### `triggerOldMap` → `Map` ###### `triggerOperationType` → `TriggerOperation` diff --git a/docs/apex/log-management/LoggerTagHandler.md b/docs/apex/log-management/LoggerTagHandler.md index 19389bb19..972d3e615 100644 --- a/docs/apex/log-management/LoggerTagHandler.md +++ b/docs/apex/log-management/LoggerTagHandler.md @@ -38,6 +38,20 @@ Schema.SObjectField The instance of `Schema.SObjectField` on `LoggerPlugin_t` for the current `SObjectType` +#### `getHandlerPluginSortField()` → `Schema.SObjectField` + +Returns the `SObjectField` on `LoggerPlugin_t` that controls the sorting of plugins for the handler's `SObjectType` + +##### Return + +**Type** + +Schema.SObjectField + +**Description** + +The instance of `Schema.SObjectField` on `LoggerPlugin_t` for the current `SObjectType` + #### `getSObjectType()` → `SObjectType` Returns SObject Type that the handler is responsible for processing diff --git a/docs/apex/logger-engine/Logger.md b/docs/apex/logger-engine/Logger.md index 992a504d3..54e76fe5d 100644 --- a/docs/apex/logger-engine/Logger.md +++ b/docs/apex/logger-engine/Logger.md @@ -4228,6 +4228,16 @@ Saves any entries in Logger's buffer, using the specified save method for o | ------------ | ------------------------------------------------------------------------- | | `saveMethod` | The enum value of Logger.SaveMethod to use for this specific save action. | +#### `saveLog(String saveMethodName)` → `void` + +Saves any entries in Logger's buffer, using the specified save method for only this call. All subsequent calls to saveLog() will use the transaction save method. + +##### Parameters + +| Param | Description | +| ---------------- | ------------------------------------------------------------------------- | +| `saveMethodName` | The String value of the save method to use for this specific save action. | + #### `setParentLogTransactionId(String parentTransactionId)` → `void` Relates the current transaction's log to a parent log via the field Log**c.ParentLog**c This is useful for relating multiple asynchronous operations together, such as batch & queueable jobs. diff --git a/docs/apex/plugin-framework/LoggerSObjectHandlerPlugin.md b/docs/apex/plugin-framework/LoggerSObjectHandlerPlugin.md index 9638bb1d7..279da0e8f 100644 --- a/docs/apex/plugin-framework/LoggerSObjectHandlerPlugin.md +++ b/docs/apex/plugin-framework/LoggerSObjectHandlerPlugin.md @@ -24,12 +24,12 @@ This method is the entry point for plugins to execute any custom logic. It is au | Param | Description | | --------------- | ------------------------------------------------------------------------------------------------ | -| `input` | The instance of `LoggerSObjectHandlerPlugin.SObjectHandlerInput`, provided by the logging system | | `configuration` | The instance of `LoggerPlugin_t` configured for this specific plugin | +| `input` | The instance of `LoggerSObjectHandlerPlugin.SObjectHandlerInput`, provided by the logging system | #### `execute(TriggerOperation triggerOperationType,List triggerNew,Map triggerNewMap,List triggerOld,Map triggerOldMap)` → `void` -@deprecated Deprecated, will be removed: This method is the entry point for plugins to execute any custom logic. It is automatically called by the logging system for any enabled plugins. Several trigger-based parameters are provided - these parameters should be used by plugins, instead of calling the platform's static variables directly (e.g., use the provided `triggerNew` variable instead of using `Trigger.new` directly, and so on). +Deprecated, will be removed: This method is the entry point for plugins to execute any custom logic. It is automatically called by the logging system for any enabled plugins. Several trigger-based parameters are provided - these parameters should be used by plugins, instead of calling the platform's static variables directly (e.g., use the provided `triggerNew` variable instead of using `Trigger.new` directly, and so on). ##### Parameters diff --git a/docs/apex/plugins/LogEntryArchiveBuilder.md b/docs/apex/plugins/LogEntryArchiveBuilder.md new file mode 100644 index 000000000..19503a4f8 --- /dev/null +++ b/docs/apex/plugins/LogEntryArchiveBuilder.md @@ -0,0 +1,24 @@ +--- +layout: default +--- + +## LogEntryArchiveBuilder class + +Optional plugin that provides a BigObject, `LogEntryArchive__b`, as an alternative option to the platform event `LogEntryEvent__e` + +--- + +### Methods + +#### `execute(LoggerPlugin_t configuration, LoggerSObjectHandler.SObjectHandlerInput input)` → `void` + +Handles converting Logger's buffer of `LogEntryEvent__e` records into `LogEntryArchive__b` records for any user with the included custom save method 'BIG_OBJECT' + +##### Parameters + +| Param | Description | +| --------------- | ------------------------------------------------------------------------------------------------ | +| `configuration` | The instance of `LoggerPlugin_t` configured for this specific plugin | +| `input` | The instance of `LoggerSObjectHandlerPlugin.SObjectHandlerInput`, provided by the logging system | + +--- diff --git a/docs/apex/plugins/LogRetentionRulesPlugin.md b/docs/apex/plugins/LogRetentionRulesPlugin.md new file mode 100644 index 000000000..73f6bfffb --- /dev/null +++ b/docs/apex/plugins/LogRetentionRulesPlugin.md @@ -0,0 +1,54 @@ +--- +layout: default +--- + +## LogRetentionRulesPlugin class + +Optional plugin that adds the ability to create & deploy advanced, configurable rules for setting the retention date of `Log__c` records, using custom metadata types `LogRetentionRule_t` and `LogRetentionRuleCondition_t`. + +--- + +### Properties + +#### `conditions` → `List` + +#### `conditionsLogic` → `String` + +#### `conditionsLogicType` → `String` + +#### `matchesFilter` → `Boolean` + +#### `record` → `SObject` + +#### `rule` → `LogRetentionRule_t` + +--- + +### Methods + +#### `FieldPath(Schema.SObjectType sobjectType, String fieldPath)` → `public` + +#### `FilterResult(SObject record, LogRetentionRule_t rule, List filterConditions)` → `public` + +#### `evaluate(String x)` → `Boolean` + +#### `execute(LoggerPlugin_t configuration, LoggerSObjectHandler.SObjectHandlerInput input)` → `void` + +Handles converting Logger's buffer of `LogEntryEvent__e` records into `LogEntryArchive__b` records for any user with the included custom save method 'BIG_OBJECT' + +##### Parameters + +| Param | Description | +| --------------- | ------------------------------------------------------------------------------------------------ | +| `configuration` | The instance of `LoggerPlugin_t` configured for this specific plugin | +| `input` | The instance of `LoggerSObjectHandlerPlugin.SObjectHandlerInput`, provided by the logging system | + +#### `getCondition()` → `String` + +#### `getField()` → `Schema.SObjectField` + +#### `getValue(SObject record)` → `Object` + +#### `matchesFilter()` → `Boolean` + +--- diff --git a/docs/apex/plugins/SlackLoggerPlugin.md b/docs/apex/plugins/SlackLoggerPlugin.md new file mode 100644 index 000000000..e3343c990 --- /dev/null +++ b/docs/apex/plugins/SlackLoggerPlugin.md @@ -0,0 +1,82 @@ +--- +layout: default +--- + +## SlackLoggerPlugin class + +Optional plugin that integrates with Slack to send alerts for important logs + +--- + +### Constructors + +#### `SlackLoggerPlugin()` + +## Default constructor + +### Properties + +#### `actions` → `List` + +#### `attachments` → `List` + +#### `author_icon` → `String` + +#### `author_link` → `String` + +#### `author_name` → `String` + +#### `color` → `String` + +#### `fallback` → `String` + +#### `fields` → `List` + +#### `isShort` → `Boolean` + +#### `pretext` → `String` + +#### `text` → `String` + +#### `text` → `String` + +#### `text` → `String` + +#### `title` → `String` + +#### `title` → `String` + +#### `title_link` → `String` + +#### `type` → `String` + +#### `url` → `String` + +#### `value` → `String` + +--- + +### Methods + +#### `execute(LoggerPlugin_t configuration, LoggerSObjectHandler.SObjectHandlerInput input)` → `void` + +Handles the integration with Slack. This method is automatically called by Nebula Logger's plugin framework. + +##### Parameters + +| Param | Description | +| --------------- | ------------------------------------------------------------------------------------------------ | +| `configuration` | The instance of `LoggerPlugin_t` configured for this specific plugin | +| `input` | The instance of `LoggerSObjectHandlerPlugin.SObjectHandlerInput`, provided by the logging system | + +#### `execute(System.QueueableContext queueableContext)` → `void` + +Handles the queuable execute logic. Required by the Queueable interface. + +##### Parameters + +| Param | Description | +| ------------------ | ----------------------------------------- | +| `queueableContext` | Context of the current queuable instance. | + +--- diff --git a/nebula-logger/core/main/configuration/classes/LoggerParameter.cls b/nebula-logger/core/main/configuration/classes/LoggerParameter.cls index 70d5f6d30..98144394b 100644 --- a/nebula-logger/core/main/configuration/classes/LoggerParameter.cls +++ b/nebula-logger/core/main/configuration/classes/LoggerParameter.cls @@ -11,7 +11,7 @@ @SuppressWarnings('PMD.CyclomaticComplexity, PMD.ExcessivePublicCount, PMD.PropertyNamingConventions') public class LoggerParameter { private static Set parametersToLoadDuringTests = new Set(); - private static Map mockParameterByDeveloperName = new Map(); + private static Map mockParameterByDeveloperName = new Map(); /** * @description Indicates if Logger will make an async callout to https://api.status.salesforce.com diff --git a/nebula-logger/core/main/log-management/classes/LogEntryEventHandler.cls b/nebula-logger/core/main/log-management/classes/LogEntryEventHandler.cls index 14919d388..d5cd3345f 100644 --- a/nebula-logger/core/main/log-management/classes/LogEntryEventHandler.cls +++ b/nebula-logger/core/main/log-management/classes/LogEntryEventHandler.cls @@ -21,6 +21,25 @@ public without sharing class LogEntryEventHandler extends LoggerSObjectHandler { private Map> logEntryEventUuidToTagNames = new Map>(); private Set tagNames = new Set(); + /** + * @description Default constructor, used by the trigger `LogEntryEvent.trigger` + */ + public LogEntryEventHandler() { + super(); + } + + /** + * @description Additional constructor specific to `LogEntryEvent__e`, used in `Logger` to simulate a `BEFORE_INSERT` context + * @param triggerOperationType The instance of `TriggerOperation` that the handler class should use - this overrides the `TriggerOperation` provided by `LoggerSObjectHandler` + * @param logEntryEvents The list of `LogEntryEvent__e` records in Logger's buffer + */ + public LogEntryEventHandler(TriggerOperation triggerOperationType, List logEntryEvents) { + this(); + this.input.triggerNew = logEntryEvents; + this.input.triggerOperationType = triggerOperationType; + this.input.triggerOperationTypeName = triggerOperationType.name(); + } + /** * @description Returns SObject Type that the handler is responsible for processing * @return The instance of `SObjectType` diff --git a/nebula-logger/core/main/log-management/classes/LoggerSObjectHandler.cls b/nebula-logger/core/main/log-management/classes/LoggerSObjectHandler.cls index 7471958f9..968011a1c 100644 --- a/nebula-logger/core/main/log-management/classes/LoggerSObjectHandler.cls +++ b/nebula-logger/core/main/log-management/classes/LoggerSObjectHandler.cls @@ -7,11 +7,21 @@ * @group Log Management * @description Abstract class used by trigger handlers for shared logic */ -@SuppressWarnings('PMD.ApexCRUDViolation, PMD.EmptyStatementBlock') +@SuppressWarnings('PMD.ApexCRUDViolation, PMD.CyclomaticComplexity, PMD.EmptyStatementBlock, PMD.FieldDeclarationsShouldBeAtStart') public without sharing abstract class LoggerSObjectHandler { private static final Map> SOBJECT_TYPE_TO_EXECUTED_HANDLERS = new Map>(); private static final Map> SOBJECT_TYPE_TO_MOCK_PLUGIN_CONFIGURATIONS = new Map>(); + protected SObjectHandlerInput input { + get { + if (input == null) { + input = this.createSObjectHandlerInput(); + } + return input; + } + set; + } + @TestVisible private TriggerOperation triggerOperationType; @TestVisible @@ -20,7 +30,6 @@ public without sharing abstract class LoggerSObjectHandler { private Map triggerNewMap; @TestVisible private Map triggerOldMap; - private SObjectHandlerInput input; private List pluginConfigurations = new List(); private List executedApexPlugins = new List(); @@ -32,8 +41,7 @@ public without sharing abstract class LoggerSObjectHandler { this.triggerNew = Trigger.new; this.triggerNewMap = Trigger.newMap; this.triggerOldMap = Trigger.oldMap; - - this.queryPluginConfigurations(); + this.pluginConfigurations = this.queryPluginConfigurations(); } /** @@ -73,8 +81,6 @@ public without sharing abstract class LoggerSObjectHandler { return; } - this.createSObjectHandlerInput(); - switch on this.input.triggerOperationType { when BEFORE_INSERT { this.executeBeforeInsert(this.input.triggerNew); @@ -138,15 +144,15 @@ public without sharing abstract class LoggerSObjectHandler { protected virtual void executeAfterUndelete(Map triggerNewMap) { } - private void createSObjectHandlerInput() { - this.input = new SObjectHandlerInput(); + private SObjectHandlerInput createSObjectHandlerInput() { + SObjectHandlerInput input = new SObjectHandlerInput(); // Trigger variables for Apex Developers input.sobjectType = this.getSObjectType(); - input.triggerOperationType = triggerOperationType; - input.triggerNew = triggerNew; - input.triggerNewMap = triggerNewMap; - input.triggerOldMap = triggerOldMap; + input.triggerOperationType = this.triggerOperationType; + input.triggerNew = this.triggerNew; + input.triggerNewMap = this.triggerNewMap; + input.triggerOldMap = this.triggerOldMap; // Additional invocable variables for Flow Builders (and Apex Developers too, if they want to use them) input.sobjectTypeName = this.getSObjectType().getDescribe().getName(); @@ -170,9 +176,11 @@ public without sharing abstract class LoggerSObjectHandler { input.triggerRecords.add(recordInput); } } + + return input; } - private void queryPluginConfigurations() { + private List queryPluginConfigurations() { // Dynamically query the LoggerPlugin__mdt CMDT object so the records are filtered by the current SObjectType, and so the records are sorted correctly List fieldsToQuery = new List(Schema.LoggerPlugin__mdt.SObjectType.getDescribe().fields.getMap().keySet()); List filterConditions = new List{ @@ -192,18 +200,19 @@ public without sharing abstract class LoggerSObjectHandler { String.join(orderByConditions, ', ') }; String query = String.format(queryTemplate, queryInputs); - this.pluginConfigurations = (List) Database.query(query); + List queriedPluginConfigurations = (List) Database.query(query); if (System.Test.isRunningTest() == true) { // Tests shouldn't rely on the actual CMDT rules in the org // Clear the org's loaded records during tests, and mock via setMockConfiguration() - this.pluginConfigurations.clear(); - + queriedPluginConfigurations.clear(); List mockPluginConfigurations = SOBJECT_TYPE_TO_MOCK_PLUGIN_CONFIGURATIONS.get(this.getSObjectType()); if (mockPluginConfigurations != null && mockPluginConfigurations.isEmpty() == false) { - this.pluginConfigurations.addAll(mockPluginConfigurations); + queriedPluginConfigurations.addAll(mockPluginConfigurations); } } + + return queriedPluginConfigurations; } private void executePlugins() { @@ -213,16 +222,17 @@ public without sharing abstract class LoggerSObjectHandler { for (LoggerPlugin__mdt pluginConfiguration : this.pluginConfigurations) { switch on pluginConfiguration.PluginType__c { - when 'Apex' { + when 'SObject Handler - Apex' { this.executeApexPlugin(pluginConfiguration); } - when 'Flow' { + when 'SObject Handler - Flow' { this.executeFlowPlugin(pluginConfiguration); } } } } + @SuppressWarnings('PMD.AvoidDebugStatements') private void executeApexPlugin(LoggerPlugin__mdt configuration) { Type apexPluginType = Type.forName(configuration.PluginApiName__c); if (apexPluginType == null) { @@ -247,6 +257,7 @@ public without sharing abstract class LoggerSObjectHandler { } } + @SuppressWarnings('PMD.AvoidDebugStatements') private void executeFlowPlugin(LoggerPlugin__mdt configuration) { Map flowInputs = new Map(); flowInputs.put('pluginConfiguration', configuration); diff --git a/nebula-logger/core/main/log-management/classes/LoggerSettingsController.cls b/nebula-logger/core/main/log-management/classes/LoggerSettingsController.cls index cc25a5d21..4944d697f 100644 --- a/nebula-logger/core/main/log-management/classes/LoggerSettingsController.cls +++ b/nebula-logger/core/main/log-management/classes/LoggerSettingsController.cls @@ -9,6 +9,9 @@ */ @SuppressWarnings('PMD.ApexCRUDViolation, PMD.CyclomaticComplexity, PMD.ExcessivePublicCount') public without sharing class LoggerSettingsController { + private static final String ADDITIONAL_SAVE_METHODS_PREFIX = 'AdditionalSaveMethods'; + private static final List MOCK_ADDITIONAL_SAVE_METHOD_PARAMETERS = new List(); + // Data methods /** * @description Indicates if the current user has access to modify `LoggerSettings__c` records, @@ -163,6 +166,11 @@ public without sharing class LoggerSettingsController { } } + @TestVisible + private static void addMockCustomSaveMethod(LoggerParameter__mdt customSaveMethodParameter) { + MOCK_ADDITIONAL_SAVE_METHOD_PARAMETERS.add(customSaveMethodParameter); + } + private static AuraHandledException createAuraHandledException(Exception ex) { AuraHandledException auraHandledException = new AuraHandledException(ex.getMessage()); auraHandledException.setMessage(ex.getMessage()); @@ -194,9 +202,15 @@ public without sharing class LoggerSettingsController { saveMethodNames.add(saveMethod.name()); } - List additionalSaveMethods = LoggerParameter.getStringList('AdditionalSaveMethods', null); - if (additionalSaveMethods != null) { - saveMethodNames.addAll(additionalSaveMethods); + String soqlSearchTerm = ADDITIONAL_SAVE_METHODS_PREFIX + '%'; + List potentiallyMatchingParameters = [SELECT Id, Value__c FROM LoggerParameter__mdt WHERE DeveloperName LIKE :soqlSearchTerm]; + + if (Test.isRunningTest() == true) { + potentiallyMatchingParameters = MOCK_ADDITIONAL_SAVE_METHOD_PARAMETERS; + } + + for (LoggerParameter__mdt matchingAdditionalParameter : potentiallyMatchingParameters) { + saveMethodNames.add(matchingAdditionalParameter.Value__c); } saveMethodNames.sort(); for (String saveMethodName : saveMethodNames) { diff --git a/nebula-logger/core/main/log-management/lwc/loggerInfo/loggerInfo.js b/nebula-logger/core/main/log-management/lwc/loggerInfo/loggerInfo.js index 28bdba17b..3789ef257 100644 --- a/nebula-logger/core/main/log-management/lwc/loggerInfo/loggerInfo.js +++ b/nebula-logger/core/main/log-management/lwc/loggerInfo/loggerInfo.js @@ -10,7 +10,7 @@ import getVersionNumber from '@salesforce/apex/LoggerInfoController.getVersionNu import getNamespacePrefix from '@salesforce/apex/LoggerInfoController.getNamespacePrefix'; import getPlugins from '@salesforce/apex/LoggerInfoController.getPlugins'; -export default class LoggerSystemInfo extends LightningElement { +export default class LoggerInfo extends LightningElement { versionNumber; namespacePrefix; plugins = []; diff --git a/nebula-logger/core/main/logger-engine/classes/Logger.cls b/nebula-logger/core/main/logger-engine/classes/Logger.cls index d7868a533..a068d251e 100644 --- a/nebula-logger/core/main/logger-engine/classes/Logger.cls +++ b/nebula-logger/core/main/logger-engine/classes/Logger.cls @@ -2544,7 +2544,7 @@ global with sharing class Logger { /** * @description Saves any entries in Logger's buffer, using the specified save method for only this call. * All subsequent calls to saveLog() will use the transaction save method. - * @param saveMethod The enum value of Logger.SaveMethod to use for this specific save action. + * @param saveMethodName The String value of the save method to use for this specific save action. */ @SuppressWarnings('PMD.NcssMethodCount') public static void saveLog(String saveMethodName) { @@ -2583,7 +2583,7 @@ global with sharing class Logger { // This gives us a chance to run the handler class & handler plugins before insert, // allowing the plugins to make further changes to the `LogEntryEvent__e` records // So, execute the handler, which internally then executes any plugins - new LogEntryEventHandler().executeBeforeInsert(logEntryEvents); + new LogEntryEventHandler(TriggerOperation.BEFORE_INSERT, logEntryEvents).execute(); // Now that the plugins have run, double check to make sure that saving should still happen if (getBufferSize() == 0) { diff --git a/nebula-logger/core/main/plugin-framework/classes/LoggerSObjectHandlerPlugin.cls b/nebula-logger/core/main/plugin-framework/classes/LoggerSObjectHandlerPlugin.cls index 80f4c0b81..c37bc4564 100644 --- a/nebula-logger/core/main/plugin-framework/classes/LoggerSObjectHandlerPlugin.cls +++ b/nebula-logger/core/main/plugin-framework/classes/LoggerSObjectHandlerPlugin.cls @@ -18,14 +18,15 @@ public abstract class LoggerSObjectHandlerPlugin { /** * @description This method is the entry point for plugins to execute any custom logic. * It is automatically called by the logging system for any enabled plugins. - * @param input The instance of `LoggerSObjectHandlerPlugin.SObjectHandlerInput`, provided by the logging system * @param configuration The instance of `LoggerPlugin__mdt` configured for this specific plugin + * @param input The instance of `LoggerSObjectHandlerPlugin.SObjectHandlerInput`, provided by the logging system */ public abstract void execute(LoggerPlugin__mdt configuration, LoggerSObjectHandler.SObjectHandlerInput input); // TODO Legacy approach, remove in a future release /** * @deprecated Deprecated, will be removed: This method is the entry point for plugins to execute any custom logic. + * @description Deprecated, will be removed: This method is the entry point for plugins to execute any custom logic. * It is automatically called by the logging system for any enabled plugins. * Several trigger-based parameters are provided - these parameters should be used by plugins, * instead of calling the platform's static variables directly diff --git a/nebula-logger/core/main/plugin-framework/objects/LoggerPlugin__mdt/fields/PluginType__c.field-meta.xml b/nebula-logger/core/main/plugin-framework/objects/LoggerPlugin__mdt/fields/PluginType__c.field-meta.xml index 18b1d4371..4b2267532 100644 --- a/nebula-logger/core/main/plugin-framework/objects/LoggerPlugin__mdt/fields/PluginType__c.field-meta.xml +++ b/nebula-logger/core/main/plugin-framework/objects/LoggerPlugin__mdt/fields/PluginType__c.field-meta.xml @@ -13,14 +13,14 @@ false - Apex + SObject Handler - Apex true - + - Flow + SObject Handler - Flow false - + diff --git a/nebula-logger/core/tests/log-management/classes/LogEntryHandler_Tests.cls b/nebula-logger/core/tests/log-management/classes/LogEntryHandler_Tests.cls index 45c2a96e3..bf76898dc 100644 --- a/nebula-logger/core/tests/log-management/classes/LogEntryHandler_Tests.cls +++ b/nebula-logger/core/tests/log-management/classes/LogEntryHandler_Tests.cls @@ -358,7 +358,7 @@ private class LogEntryHandler_Tests { Test.startTest(); // Use the mock configurations - LoggerPlugin__mdt plugin = new LoggerPlugin__mdt(PluginType__c = 'Apex', PluginApiName__c = LogEntryPluginTest.class.getName()); + LoggerPlugin__mdt plugin = new LoggerPlugin__mdt(PluginType__c = 'SObject Handler - Apex', PluginApiName__c = LogEntryPluginTest.class.getName()); LoggerSObjectHandler.setMockPlugin(Schema.LogEntry__c.SObjectType, plugin); LogEntry__c logEntry = new LogEntry__c(Log__c = log.Id, Message__c = 'qwerty'); diff --git a/nebula-logger/core/tests/log-management/classes/LogHandler_Tests.cls b/nebula-logger/core/tests/log-management/classes/LogHandler_Tests.cls index cca04ebf5..9c1216e6d 100644 --- a/nebula-logger/core/tests/log-management/classes/LogHandler_Tests.cls +++ b/nebula-logger/core/tests/log-management/classes/LogHandler_Tests.cls @@ -361,7 +361,7 @@ private class LogHandler_Tests { Test.startTest(); // Use the mock configurations - LoggerPlugin__mdt plugin = new LoggerPlugin__mdt(PluginType__c = 'Apex', PluginApiName__c = LogPluginTest.class.getName()); + LoggerPlugin__mdt plugin = new LoggerPlugin__mdt(PluginType__c = 'SObject Handler - Apex', PluginApiName__c = LogPluginTest.class.getName()); LoggerSObjectHandler.setMockPlugin(Schema.Log__c.SObjectType, plugin); Log__c log = new Log__c(LoggedBy__c = UserInfo.getUserId(), TransactionId__c = '1234'); diff --git a/nebula-logger/core/tests/log-management/classes/LoggerSObjectHandler_Tests.cls b/nebula-logger/core/tests/log-management/classes/LoggerSObjectHandler_Tests.cls index 99fd73f52..8af1d7c96 100644 --- a/nebula-logger/core/tests/log-management/classes/LoggerSObjectHandler_Tests.cls +++ b/nebula-logger/core/tests/log-management/classes/LoggerSObjectHandler_Tests.cls @@ -3,6 +3,7 @@ // See LICENSE file or go to https://github.com/jongpie/NebulaLogger for full license details. // //------------------------------------------------------------------------------------------------// +@SuppressWarnings('PMD.ApexDoc, PMD.ApexAssertionsShouldIncludeMessage, PMD.MethodNamingConventions') @IsTest private class LoggerSObjectHandler_Tests { private static final String HANDLER_CONTROL_PARAMETER_NAME = 'IsMockLogHandlerEnabled'; @@ -162,12 +163,13 @@ private class LoggerSObjectHandler_Tests { IsEnabled__c = true, IsLogEnabled__c = true, PluginApiName__c = 'Some_Fake_Apex_Class', - PluginType__c = 'Apex' + PluginType__c = 'SObject Handler - Apex' ); handler.addMockPlugin(plugin); handler.execute(); + System.assertEquals(1, handler.executionCount); System.assertEquals(1, handler.getPluginConfigurations().size()); System.assertEquals(0, handler.getExecutedApexPlugins().size()); } @@ -183,12 +185,13 @@ private class LoggerSObjectHandler_Tests { IsEnabled__c = true, IsLogEnabled__c = true, PluginApiName__c = 'Some_Fake_Flow', - PluginType__c = 'Flow' + PluginType__c = 'SObject Handler - Flow' ); handler.addMockPlugin(plugin); handler.execute(); + System.assertEquals(1, handler.executionCount); System.assertEquals(1, handler.getPluginConfigurations().size()); System.assertEquals(0, handler.getExecutedApexPlugins().size()); } diff --git a/nebula-logger/core/tests/log-management/classes/LoggerSettingsController_Tests.cls b/nebula-logger/core/tests/log-management/classes/LoggerSettingsController_Tests.cls index 41631eb3a..21a0d739a 100644 --- a/nebula-logger/core/tests/log-management/classes/LoggerSettingsController_Tests.cls +++ b/nebula-logger/core/tests/log-management/classes/LoggerSettingsController_Tests.cls @@ -40,8 +40,10 @@ private class LoggerSettingsController_Tests { @IsTest static void it_should_append_custom_loggerSaveMethod_picklist_options_when_configured() { - List fakeSaveMethods = new List{ 'a fake save method', 'another one', 'some other save method' }; - LoggerParameter.setMockParameter(new LoggerParameter__mdt(DeveloperName = 'AdditionalSaveMethods', Value__c = JSON.serialize(fakeSaveMethods))); + List fakeSaveMethods = new List{ 'A_FAKE_SAVE_METHOD', 'ANOTHER_ONE', 'SOME_OTHER_SAVE_METHOD' }; + for (String fakeSaveMethod : fakeSaveMethods) { + LoggerSettingsController.addMockCustomSaveMethod(new LoggerParameter__mdt(DeveloperName = fakeSaveMethod, Value__c = fakeSaveMethod)); + } List picklistOptions = LoggerSettingsController.getPicklistOptions().saveMethodOptions; @@ -56,8 +58,8 @@ private class LoggerSettingsController_Tests { if (String.isBlank(picklistOption.value) == true) { System.assertEquals('--None--', picklistOption.label); } else { - System.assertEquals(picklistOption.value, picklistOption.label); - System.assertEquals(true, expectedSaveMethods.contains(picklistOption.value)); + System.assertEquals(picklistOption.value, picklistOption.label, 'picklistOption==' + picklistOption); + System.assertEquals(true, expectedSaveMethods.contains(picklistOption.value), 'picklistOption==' + picklistOption); } } } diff --git a/nebula-logger/extra-tests/tests/LogHandler_Tests_Flow.cls b/nebula-logger/extra-tests/tests/LogHandler_Tests_Flow.cls index 5d388ed32..735fcdb76 100644 --- a/nebula-logger/extra-tests/tests/LogHandler_Tests_Flow.cls +++ b/nebula-logger/extra-tests/tests/LogHandler_Tests_Flow.cls @@ -18,7 +18,7 @@ private class LogHandler_Tests_Flow { Test.startTest(); // Use the mock configurations - LoggerPlugin__mdt plugin = new LoggerPlugin__mdt(PluginType__c = 'Flow', PluginApiName__c = pluginFlowApiName); + LoggerPlugin__mdt plugin = new LoggerPlugin__mdt(PluginType__c = 'SObject Handler - Flow', PluginApiName__c = pluginFlowApiName); LoggerSObjectHandler.setMockPlugin(Schema.Log__c.SObjectType, plugin); Log__c log = new Log__c(TransactionId__c = '1234'); diff --git a/nebula-logger/managed-package/core/main/plugin-framework/objects/LoggerPlugin__mdt/fields/SObjectType__c.field-meta.xml b/nebula-logger/managed-package/core/main/plugin-framework/objects/LoggerPlugin__mdt/fields/SObjectType__c.field-meta.xml new file mode 100644 index 000000000..1ff9fff91 --- /dev/null +++ b/nebula-logger/managed-package/core/main/plugin-framework/objects/LoggerPlugin__mdt/fields/SObjectType__c.field-meta.xml @@ -0,0 +1,15 @@ + + + SObjectType__c + false + DeveloperControlled + Deprecated: This field is no longer used. + Deprecated: This field is no longer used. + + EntityDefinition + Logger Plugins + LoggerSObjectHandlerPlugins + false + MetadataRelationship + false + diff --git a/nebula-logger/managed-package/core/main/plugin-framework/objects/LoggerPlugin__mdt/validationRules/Plugins_are_not_supported.validationRule-meta.xml b/nebula-logger/managed-package/core/main/plugin-framework/objects/LoggerPlugin__mdt/validationRules/Plugins_are_not_supported.validationRule-meta.xml new file mode 100644 index 000000000..62c4d3c35 --- /dev/null +++ b/nebula-logger/managed-package/core/main/plugin-framework/objects/LoggerPlugin__mdt/validationRules/Plugins_are_not_supported.validationRule-meta.xml @@ -0,0 +1,9 @@ + + + Plugins_are_not_supported + false + Deprecated: this validation rule is no longer used + false + IsEnabled__c + Plugins are not supported for this SObject Handler + diff --git a/nebula-logger/managed-package/sfdx-project.json b/nebula-logger/managed-package/sfdx-project.json index 16229ea42..544fac143 100644 --- a/nebula-logger/managed-package/sfdx-project.json +++ b/nebula-logger/managed-package/sfdx-project.json @@ -10,9 +10,9 @@ "definitionFile": "./config/scratch-orgs/base-scratch-def.json", "postInstallScript": "LoggerInstallHandler", "ancestorVersion": "HIGHEST", - "versionNumber": "4.7.0.NEXT", - "versionName": "Spring '22 Release", - "versionDescription": "View the v4.7.0 milestone in GitHub for the list of changes - https://github.com/jongpie/NebulaLogger/milestone/7", + "versionNumber": "4.8.0.NEXT", + "versionName": "BETA - Summer '22 Release", + "versionDescription": "View the v4.8.0 milestone in GitHub for the list of changes - https://github.com/jongpie/NebulaLogger/milestone/7", "releaseNotesUrl": "https://github.com/jongpie/NebulaLogger/releases" } ], diff --git a/nebula-logger/plugins/big-object-archiving/plugin/classes/LogEntryArchiveBuilder.cls b/nebula-logger/plugins/big-object-archiving/plugin/classes/LogEntryArchiveBuilder.cls new file mode 100644 index 000000000..88dbaa3c8 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/classes/LogEntryArchiveBuilder.cls @@ -0,0 +1,142 @@ +//------------------------------------------------------------------------------------------------// +// This file is part of the Nebula Logger project, released under the MIT License. // +// See LICENSE file or go to https://github.com/jongpie/NebulaLogger for full license details. // +//------------------------------------------------------------------------------------------------// + +/** + * @group Plugins + * @description Optional plugin that provides a BigObject, `LogEntryArchive__b`, as an alternative option + * to the platform event `LogEntryEvent__e` + */ +public without sharing class LogEntryArchiveBuilder extends LoggerSObjectHandlerPlugin { + @TestVisible + private static final String BIG_OBJECT_SAVE_METHOD = 'BIG_OBJECT'; + @TestVisible + private static List bigObjectsToInsert = new List(); + + /** + * @description Handles converting Logger's buffer of `LogEntryEvent__e` records into `LogEntryArchive__b` records + * for any user with the included custom save method 'BIG_OBJECT' + * @param configuration The instance of `LoggerPlugin__mdt` configured for this specific plugin + * @param input The instance of `LoggerSObjectHandlerPlugin.SObjectHandlerInput`, provided by the logging system + */ + public override void execute(LoggerPlugin__mdt configuration, LoggerSObjectHandler.SObjectHandlerInput input) { + if (Logger.getUserSettings().DefaultSaveMethod__c != BIG_OBJECT_SAVE_METHOD) { + return; + } + + List logEntryEvents = (List) input.triggerNew; + for (LogEntryEvent__e logEntryEvent : logEntryEvents) { + bigObjectsToInsert.add(this.getLogEntryArchive(logEntryEvent)); + } + if (!Test.isRunningTest()) { + Database.insertImmediate(bigObjectsToInsert); + bigObjectsToInsert.clear(); + } + Logger.flushBuffer(); + } + + private LogEntryArchive__b getLogEntryArchive(LogEntryEvent__e logEntryEvent) { + return new LogEntryArchive__b( + ApiVersion__c = logEntryEvent.ApiVersion__c, + ComponentType__c = logEntryEvent.ComponentType__c, + DatabaseResultCollectionType__c = logEntryEvent.DatabaseResultCollectionType__c, + DatabaseResultJson__c = logEntryEvent.DatabaseResultJson__c, + DatabaseResultType__c = logEntryEvent.DatabaseResultType__c, + EpochTimestamp__c = logEntryEvent.EpochTimestamp__c, + ExceptionMessage__c = logEntryEvent.ExceptionMessage__c, + ExceptionStackTrace__c = logEntryEvent.ExceptionStackTrace__c, + ExceptionType__c = logEntryEvent.ExceptionType__c, + LimitsAggregateQueriesMax__c = logEntryEvent.LimitsAggregateQueriesMax__c, + LimitsAggregateQueriesUsed__c = logEntryEvent.LimitsAggregateQueriesUsed__c, + LimitsAsyncCallsMax__c = logEntryEvent.LimitsAsyncCallsMax__c, + LimitsAsyncCallsUsed__c = logEntryEvent.LimitsAsyncCallsUsed__c, + LimitsCalloutsUsed__c = logEntryEvent.LimitsCalloutsUsed__c, + LimitsCpuTimeMax__c = logEntryEvent.LimitsCpuTimeMax__c, + LimitsCpuTimeUsed__c = logEntryEvent.LimitsCpuTimeUsed__c, + LimitsDmlRowsMax__c = logEntryEvent.LimitsDmlRowsMax__c, + LimitsDmlRowsUsed__c = logEntryEvent.LimitsDmlRowsUsed__c, + LimitsDmlStatementsMax__c = logEntryEvent.LimitsDmlStatementsMax__c, + LimitsDmlStatementsUsed__c = logEntryEvent.LimitsDmlStatementsUsed__c, + LimitsEmailInvocationsMax__c = logEntryEvent.LimitsEmailInvocationsMax__c, + LimitsEmailInvocationsUsed__c = logEntryEvent.LimitsEmailInvocationsUsed__c, + LimitsFutureCallsMax__c = logEntryEvent.LimitsFutureCallsMax__c, + LimitsFutureCallsUsed__c = logEntryEvent.LimitsFutureCallsUsed__c, + LimitsHeapSizeMax__c = logEntryEvent.LimitsHeapSizeMax__c, + LimitsHeapSizeUsed__c = logEntryEvent.LimitsHeapSizeUsed__c, + LimitsMobilePushApexCallsMax__c = logEntryEvent.LimitsMobilePushApexCallsMax__c, + LimitsMobilePushApexCallsUsed__c = logEntryEvent.LimitsMobilePushApexCallsUsed__c, + LimitsPublishImmediateDmlStatementsMax__c = logEntryEvent.LimitsPublishImmediateDmlStatementsMax__c, + LimitsPublishImmediateDmlStatementsUsed__c = logEntryEvent.LimitsPublishImmediateDmlStatementsUsed__c, + LimitsQueueableJobsMax__c = logEntryEvent.LimitsQueueableJobsMax__c, + LimitsQueueableJobsUsed__c = logEntryEvent.LimitsQueueableJobsUsed__c, + LimitsSoqlQueriesMax__c = logEntryEvent.LimitsSoqlQueriesMax__c, + LimitsSoqlQueriesUsed__c = logEntryEvent.LimitsSoqlQueriesUsed__c, + LimitsSoqlQueryLocatorRowsMax__c = logEntryEvent.LimitsSoqlQueryLocatorRowsMax__c, + LimitsSoqlQueryLocatorRowsUsed__c = logEntryEvent.LimitsSoqlQueryLocatorRowsUsed__c, + LimitsSoqlQueryRowsMax__c = logEntryEvent.LimitsSoqlQueryRowsMax__c, + LimitsSoqlQueryRowsUsed__c = logEntryEvent.LimitsSoqlQueryRowsUsed__c, + LimitsSoslSearchesMax__c = logEntryEvent.LimitsSoslSearchesMax__c, + LimitsSoslSearchesUsed__c = logEntryEvent.LimitsSoslSearchesUsed__c, + Locale__c = logEntryEvent.Locale__c, + LoggedBy__c = String.isNotBlank(logEntryEvent.LoggedById__c) ? logEntryEvent.LoggedById__c : 'Anonymous', + LoggedById__c = logEntryEvent.LoggedById__c, + LoggedByUsername__c = logEntryEvent.LoggedByUsername__c, + LoggerVersionNumber__c = logEntryEvent.LoggerVersionNumber__c, + LoggingLevel__c = logEntryEvent.LoggingLevel__c, + LoggingLevelOrdinal__c = logEntryEvent.LoggingLevelOrdinal__c, + LoginApplication__c = logEntryEvent.LoginApplication__c, + LoginBrowser__c = logEntryEvent.LoginBrowser__c, + LoginHistoryId__c = logEntryEvent.LoginHistoryId__c, + LoginPlatform__c = logEntryEvent.LoginPlatform__c, + LoginType__c = logEntryEvent.LoginType__c, + LogoutUrl__c = logEntryEvent.LogoutUrl__c, + Message__c = logEntryEvent.Message__c, + NetworkId__c = logEntryEvent.NetworkId__c, + NetworkLoginUrl__c = logEntryEvent.NetworkLoginUrl__c, + NetworkLogoutUrl__c = logEntryEvent.NetworkLogoutUrl__c, + NetworkSelfRegistrationUrl__c = logEntryEvent.NetworkSelfRegistrationUrl__c, + NetworkUrlPathPrefix__c = logEntryEvent.NetworkUrlPathPrefix__c, + OrganizationDomainUrl__c = logEntryEvent.OrganizationDomainUrl__c, + OrganizationEnvironmentType__c = logEntryEvent.OrganizationEnvironmentType__c, + OrganizationId__c = logEntryEvent.OrganizationId__c, + OrganizationInstanceName__c = logEntryEvent.OrganizationInstanceName__c, + OrganizationName__c = logEntryEvent.OrganizationName__c, + OrganizationNamespacePrefix__c = logEntryEvent.OrganizationNamespacePrefix__c, + OrganizationType__c = logEntryEvent.OrganizationType__c, + OriginLocation__c = logEntryEvent.OriginLocation__c, + OriginType__c = logEntryEvent.OriginType__c, + ParentLogTransactionId__c = logEntryEvent.ParentLogTransactionId__c, + ProfileId__c = logEntryEvent.ProfileId__c, + ProfileName__c = logEntryEvent.ProfileName__c, + RecordCollectionType__c = logEntryEvent.RecordCollectionType__c, + RecordId__c = logEntryEvent.RecordId__c, + RecordJson__c = logEntryEvent.RecordJson__c, + RecordSObjectClassification__c = logEntryEvent.RecordSObjectClassification__c, + RecordSObjectType__c = logEntryEvent.RecordSObjectType__c, + RecordSObjectTypeNamespace__c = logEntryEvent.RecordSObjectTypeNamespace__c, + SessionId__c = logEntryEvent.SessionId__c, + SessionSecurityLevel__c = logEntryEvent.SessionSecurityLevel__c, + SessionType__c = logEntryEvent.SessionType__c, + SourceIp__c = logEntryEvent.SourceIp__c, + StackTrace__c = logEntryEvent.StackTrace__c, + SystemMode__c = logEntryEvent.SystemMode__c, + Tags__c = logEntryEvent.Tags__c, + ThemeDisplayed__c = logEntryEvent.ThemeDisplayed__c, + Timestamp__c = logEntryEvent.Timestamp__c, + TimestampString__c = logEntryEvent.TimestampString__c, + TimeZoneId__c = logEntryEvent.TimeZoneId__c, + TransactionEntryNumber__c = logEntryEvent.TransactionEntryNumber__c, + TransactionId__c = logEntryEvent.TransactionId__c, + TriggerOperationType__c = logEntryEvent.TriggerOperationType__c, + TriggerSObjectType__c = logEntryEvent.TriggerSObjectType__c, + UserLicenseDefinitionKey__c = logEntryEvent.UserLicenseDefinitionKey__c, + UserLicenseName__c = logEntryEvent.UserLicenseName__c, + UserLoggingLevel__c = logEntryEvent.UserLoggingLevel__c, + UserLoggingLevelOrdinal__c = logEntryEvent.UserLoggingLevelOrdinal__c, + UserRoleId__c = logEntryEvent.UserRoleId__c, + UserRoleName__c = logEntryEvent.UserRoleName__c, + UserType__c = logEntryEvent.UserType__c + ); + } +} diff --git a/nebula-logger/plugins/big-object-archiving/plugin/classes/LogEntryArchiveBuilder.cls-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/classes/LogEntryArchiveBuilder.cls-meta.xml new file mode 100644 index 000000000..891916bb0 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/classes/LogEntryArchiveBuilder.cls-meta.xml @@ -0,0 +1,5 @@ + + + 54.0 + Active + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/classes/LogEntryArchiveBuilder_Tests.cls b/nebula-logger/plugins/big-object-archiving/plugin/classes/LogEntryArchiveBuilder_Tests.cls new file mode 100644 index 000000000..2bedc4fac --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/classes/LogEntryArchiveBuilder_Tests.cls @@ -0,0 +1,273 @@ +//------------------------------------------------------------------------------------------------// +// This file is part of the Nebula Logger project, released under the MIT License. // +// See LICENSE file or go to https://github.com/jongpie/NebulaLogger for full license details. // +//------------------------------------------------------------------------------------------------// + +@SuppressWarnings('PMD.ApexDoc, PMD.ApexAssertionsShouldIncludeMessage, PMD.MethodNamingConventions') +@IsTest +private class LogEntryArchiveBuilder_Tests { + private static final String FAKE_DATA_STRING = 'someFakeData'; + private static final Integer FAKE_DATA_NUMBER = 1; + + @IsTest + static void it_should_write_all_fields_over_from_log_entry_event() { + Datetime timestamp = System.now(); + LogEntryEvent__e mockEvent = getMockEvent(timestamp); + + LoggerPlugin__mdt pluginConfiguration = getPluginConfiguration(); + LoggerSObjectHandler.SObjectHandlerInput pluginInput = new LoggerSObjectHandler.SObjectHandlerInput(); + pluginInput.triggerNew = new List{ mockEvent }; + Logger.getUserSettings().DefaultSaveMethod__c = LogEntryArchiveBuilder.BIG_OBJECT_SAVE_METHOD; + + new LogEntryArchiveBuilder().execute(pluginConfiguration, pluginInput); + + List insertedBigObjects = LogEntryArchiveBuilder.bigObjectsToInsert; + System.assertEquals(1, insertedBigObjects.size(), 'Should have been put into big object buffer'); + assertAllFieldsMatch(timestamp, mockEvent, insertedBigObjects[0]); + } + + @IsTest + static void it_should_not_create_big_object_with_other_save_methods() { + Datetime timestamp = System.now(); + LogEntryEvent__e mockEvent = getMockEvent(timestamp); + + LoggerPlugin__mdt pluginConfiguration = getPluginConfiguration(); + LoggerSObjectHandler.SObjectHandlerInput pluginInput = new LoggerSObjectHandler.SObjectHandlerInput(); + pluginInput.triggerNew = new List{ mockEvent }; + Logger.getUserSettings().DefaultSaveMethod__c = Logger.SaveMethod.EVENT_BUS.name(); + + new LogEntryArchiveBuilder().execute(pluginConfiguration, pluginInput); + + System.assertEquals(0, LogEntryArchiveBuilder.bigObjectsToInsert.size(), 'Should not have tried to create big object'); + } + + @IsTest + static void it_integrates_with_logger() { + Test.startTest(); + getPluginConfiguration(); + Logger.getUserSettings().DefaultSaveMethod__c = LogEntryArchiveBuilder.BIG_OBJECT_SAVE_METHOD; + LogEntryEvent__e createdEvent = Logger.info('Testing big object creation').getLogEntryEvent(); + Logger.saveLog(); + System.assertEquals( + 0, + Limits.getPublishImmediateDML(), + 'Should not have actually used the event bus in tests because big objects actually get inserted, yikes' + ); + Test.stopTest(); + + List insertedBigObjects = LogEntryArchiveBuilder.bigObjectsToInsert; + System.assertEquals(1, insertedBigObjects.size(), 'Should have been put into big object buffer'); + assertAllFieldsMatch(createdEvent.Timestamp__c, createdEvent, insertedBigObjects[0]); + } + + private static LogEntryEvent__e getMockEvent(Datetime timestamp) { + return new LogEntryEvent__e( + ApiVersion__c = '52', + DatabaseResultCollectionType__c = FAKE_DATA_STRING, + DatabaseResultJson__c = FAKE_DATA_STRING, + DatabaseResultType__c = FAKE_DATA_STRING, + ExceptionMessage__c = FAKE_DATA_STRING, + ExceptionStackTrace__c = FAKE_DATA_STRING, + ExceptionType__c = FAKE_DATA_STRING, + LimitsAggregateQueriesMax__c = FAKE_DATA_NUMBER, + LimitsAggregateQueriesUsed__c = FAKE_DATA_NUMBER, + LimitsAsyncCallsMax__c = FAKE_DATA_NUMBER, + LimitsAsyncCallsUsed__c = FAKE_DATA_NUMBER, + LimitsCalloutsUsed__c = FAKE_DATA_NUMBER, + LimitsCpuTimeMax__c = FAKE_DATA_NUMBER, + LimitsCpuTimeUsed__c = FAKE_DATA_NUMBER, + LimitsDmlRowsMax__c = FAKE_DATA_NUMBER, + LimitsDmlRowsUsed__c = FAKE_DATA_NUMBER, + LimitsDmlStatementsMax__c = FAKE_DATA_NUMBER, + LimitsDmlStatementsUsed__c = FAKE_DATA_NUMBER, + LimitsEmailInvocationsMax__c = FAKE_DATA_NUMBER, + LimitsEmailInvocationsUsed__c = FAKE_DATA_NUMBER, + LimitsFutureCallsMax__c = FAKE_DATA_NUMBER, + LimitsFutureCallsUsed__c = FAKE_DATA_NUMBER, + LimitsHeapSizeMax__c = FAKE_DATA_NUMBER, + LimitsHeapSizeUsed__c = FAKE_DATA_NUMBER, + LimitsMobilePushApexCallsMax__c = FAKE_DATA_NUMBER, + LimitsMobilePushApexCallsUsed__c = FAKE_DATA_NUMBER, + LimitsQueueableJobsMax__c = FAKE_DATA_NUMBER, + LimitsQueueableJobsUsed__c = FAKE_DATA_NUMBER, + LimitsSoqlQueriesMax__c = FAKE_DATA_NUMBER, + LimitsSoqlQueriesUsed__c = FAKE_DATA_NUMBER, + LimitsSoqlQueryLocatorRowsMax__c = FAKE_DATA_NUMBER, + LimitsSoqlQueryLocatorRowsUsed__c = FAKE_DATA_NUMBER, + LimitsSoqlQueryRowsMax__c = FAKE_DATA_NUMBER, + LimitsSoqlQueryRowsUsed__c = FAKE_DATA_NUMBER, + LimitsSoslSearchesMax__c = FAKE_DATA_NUMBER, + LimitsSoslSearchesUsed__c = FAKE_DATA_NUMBER, + Locale__c = FAKE_DATA_STRING, + LoggedByUsername__c = FAKE_DATA_STRING, + LoggingLevel__c = FAKE_DATA_STRING, + LoggingLevelOrdinal__c = FAKE_DATA_NUMBER, + LoginApplication__c = FAKE_DATA_STRING, + LoginBrowser__c = FAKE_DATA_STRING, + LoginHistoryId__c = FAKE_DATA_STRING, + LoginPlatform__c = FAKE_DATA_STRING, + LoginType__c = FAKE_DATA_STRING, + LogoutUrl__c = FAKE_DATA_STRING, + Message__c = FAKE_DATA_STRING, + NetworkId__c = FAKE_DATA_STRING, + NetworkLoginUrl__c = FAKE_DATA_STRING, + NetworkLogoutUrl__c = FAKE_DATA_STRING, + NetworkSelfRegistrationUrl__c = FAKE_DATA_STRING, + NetworkUrlPathPrefix__c = FAKE_DATA_STRING, + OrganizationDomainUrl__c = FAKE_DATA_STRING, + OrganizationEnvironmentType__c = FAKE_DATA_STRING, + OrganizationId__c = FAKE_DATA_STRING, + OrganizationInstanceName__c = FAKE_DATA_STRING, + OrganizationName__c = FAKE_DATA_STRING, + OrganizationNamespacePrefix__c = FAKE_DATA_STRING, + OrganizationType__c = FAKE_DATA_STRING, + OriginLocation__c = FAKE_DATA_STRING, + OriginType__c = FAKE_DATA_STRING, + ParentLogTransactionId__c = FAKE_DATA_STRING, + ProfileId__c = FAKE_DATA_STRING, + ProfileName__c = FAKE_DATA_STRING, + RecordCollectionType__c = FAKE_DATA_STRING, + RecordId__c = FAKE_DATA_STRING, + RecordJson__c = FAKE_DATA_STRING, + RecordSObjectClassification__c = FAKE_DATA_STRING, + RecordSObjectType__c = FAKE_DATA_STRING, + RecordSObjectTypeNamespace__c = FAKE_DATA_STRING, + SessionId__c = FAKE_DATA_STRING, + SessionSecurityLevel__c = FAKE_DATA_STRING, + SessionType__c = FAKE_DATA_STRING, + SourceIp__c = FAKE_DATA_STRING, + StackTrace__c = FAKE_DATA_STRING, + SystemMode__c = FAKE_DATA_STRING, + Tags__c = FAKE_DATA_STRING, + ThemeDisplayed__c = FAKE_DATA_STRING, + Timestamp__c = timestamp, + TimestampString__c = String.valueOf(timestamp.getTime()), + TimeZoneId__c = FAKE_DATA_STRING, + TransactionEntryNumber__c = FAKE_DATA_NUMBER, + TransactionId__c = FAKE_DATA_STRING, + TriggerOperationType__c = FAKE_DATA_STRING, + TriggerSObjectType__c = FAKE_DATA_STRING, + UserLicenseDefinitionKey__c = FAKE_DATA_STRING, + UserLicenseName__c = FAKE_DATA_STRING, + UserLoggingLevel__c = FAKE_DATA_STRING, + UserLoggingLevelOrdinal__c = FAKE_DATA_NUMBER, + UserRoleId__c = FAKE_DATA_STRING, + UserRoleName__c = FAKE_DATA_STRING, + UserType__c = FAKE_DATA_STRING + ); + } + + private static LoggerPlugin__mdt getPluginConfiguration() { + LoggerPlugin__mdt config = new LoggerPlugin__mdt( + IsEnabled__c = true, + IsLogEntryEventEnabled__c = true, + PluginApiName__c = LogEntryArchiveBuilder.class.getName(), + PluginType__c = 'SObject Handler - Apex' + ); + LoggerSObjectHandler.setMockPlugin(Schema.LogEntryEvent__e.SObjectType, config); + return config; + } + + @SuppressWarnings('PMD.NcssMethodCount') + private static void assertAllFieldsMatch(Datetime timestamp, LogEntryEvent__e mockEvent, LogEntryArchive__b logEntryArchive) { + System.assertEquals(mockEvent.ApiVersion__c, logEntryArchive.ApiVersion__c); + System.assertEquals(mockEvent.ComponentType__c, logEntryArchive.ComponentType__c); + System.assertEquals(mockEvent.DatabaseResultCollectionType__c, logEntryArchive.DatabaseResultCollectionType__c); + System.assertEquals(mockEvent.DatabaseResultJson__c, logEntryArchive.DatabaseResultJson__c); + System.assertEquals(mockEvent.DatabaseResultType__c, logEntryArchive.DatabaseResultType__c); + System.assertEquals(mockEvent.EpochTimestamp__c, logEntryArchive.EpochTimestamp__c); + System.assertEquals(mockEvent.ExceptionMessage__c, logEntryArchive.ExceptionMessage__c); + System.assertEquals(mockEvent.ExceptionStackTrace__c, logEntryArchive.ExceptionStackTrace__c); + System.assertEquals(mockEvent.ExceptionType__c, logEntryArchive.ExceptionType__c); + System.assertEquals(mockEvent.LimitsAggregateQueriesMax__c, logEntryArchive.LimitsAggregateQueriesMax__c); + System.assertEquals(mockEvent.LimitsAggregateQueriesUsed__c, logEntryArchive.LimitsAggregateQueriesUsed__c); + System.assertEquals(mockEvent.LimitsAsyncCallsMax__c, logEntryArchive.LimitsAsyncCallsMax__c); + System.assertEquals(mockEvent.LimitsAsyncCallsUsed__c, logEntryArchive.LimitsAsyncCallsUsed__c); + System.assertEquals(mockEvent.LimitsCalloutsUsed__c, logEntryArchive.LimitsCalloutsUsed__c); + System.assertEquals(mockEvent.LimitsCpuTimeMax__c, logEntryArchive.LimitsCpuTimeMax__c); + System.assertEquals(mockEvent.LimitsCpuTimeUsed__c, logEntryArchive.LimitsCpuTimeUsed__c); + System.assertEquals(mockEvent.LimitsDmlRowsMax__c, logEntryArchive.LimitsDmlRowsMax__c); + System.assertEquals(mockEvent.LimitsDmlRowsUsed__c, logEntryArchive.LimitsDmlRowsUsed__c); + System.assertEquals(mockEvent.LimitsDmlStatementsMax__c, logEntryArchive.LimitsDmlStatementsMax__c); + System.assertEquals(mockEvent.LimitsDmlStatementsUsed__c, logEntryArchive.LimitsDmlStatementsUsed__c); + System.assertEquals(mockEvent.LimitsEmailInvocationsMax__c, logEntryArchive.LimitsEmailInvocationsMax__c); + System.assertEquals(mockEvent.LimitsEmailInvocationsUsed__c, logEntryArchive.LimitsEmailInvocationsUsed__c); + System.assertEquals(mockEvent.LimitsFutureCallsMax__c, logEntryArchive.LimitsFutureCallsMax__c); + System.assertEquals(mockEvent.LimitsFutureCallsUsed__c, logEntryArchive.LimitsFutureCallsUsed__c); + System.assertEquals(mockEvent.LimitsHeapSizeMax__c, logEntryArchive.LimitsHeapSizeMax__c); + System.assertEquals(mockEvent.LimitsHeapSizeUsed__c, logEntryArchive.LimitsHeapSizeUsed__c); + System.assertEquals(mockEvent.LimitsPublishImmediateDmlStatementsMax__c, logEntryArchive.LimitsPublishImmediateDmlStatementsMax__c); + System.assertEquals(mockEvent.LimitsPublishImmediateDmlStatementsUsed__c, logEntryArchive.LimitsPublishImmediateDmlStatementsUsed__c); + System.assertEquals(mockEvent.LimitsMobilePushApexCallsMax__c, logEntryArchive.LimitsMobilePushApexCallsMax__c); + System.assertEquals(mockEvent.LimitsMobilePushApexCallsUsed__c, logEntryArchive.LimitsMobilePushApexCallsUsed__c); + System.assertEquals(mockEvent.LimitsQueueableJobsMax__c, logEntryArchive.LimitsQueueableJobsMax__c); + System.assertEquals(mockEvent.LimitsQueueableJobsUsed__c, logEntryArchive.LimitsQueueableJobsUsed__c); + System.assertEquals(mockEvent.LimitsSoqlQueriesMax__c, logEntryArchive.LimitsSoqlQueriesMax__c); + System.assertEquals(mockEvent.LimitsSoqlQueriesUsed__c, logEntryArchive.LimitsSoqlQueriesUsed__c); + System.assertEquals(mockEvent.LimitsSoqlQueryLocatorRowsMax__c, logEntryArchive.LimitsSoqlQueryLocatorRowsMax__c); + System.assertEquals(mockEvent.LimitsSoqlQueryLocatorRowsUsed__c, logEntryArchive.LimitsSoqlQueryLocatorRowsUsed__c); + System.assertEquals(mockEvent.LimitsSoqlQueryRowsMax__c, logEntryArchive.LimitsSoqlQueryRowsMax__c); + System.assertEquals(mockEvent.LimitsSoqlQueryRowsUsed__c, logEntryArchive.LimitsSoqlQueryRowsUsed__c); + System.assertEquals(mockEvent.LimitsSoslSearchesMax__c, logEntryArchive.LimitsSoslSearchesMax__c); + System.assertEquals(mockEvent.LimitsSoslSearchesUsed__c, logEntryArchive.LimitsSoslSearchesUsed__c); + System.assertEquals(mockEvent.Locale__c, logEntryArchive.Locale__c); + System.assertEquals(String.isNotBlank(mockEvent.LoggedById__c) ? mockEvent.LoggedById__c : 'Anonymous', logEntryArchive.LoggedBy__c); + System.assertEquals(mockEvent.LoggedById__c, logEntryArchive.LoggedById__c); + System.assertEquals(mockEvent.LoggedByUsername__c, logEntryArchive.LoggedByUsername__c); + System.assertEquals(mockEvent.LoggerVersionNumber__c, logEntryArchive.LoggerVersionNumber__c); + System.assertEquals(mockEvent.LoggingLevel__c, logEntryArchive.LoggingLevel__c); + System.assertEquals(mockEvent.LoggingLevelOrdinal__c, logEntryArchive.LoggingLevelOrdinal__c); + System.assertEquals(mockEvent.LoginApplication__c, logEntryArchive.LoginApplication__c); + System.assertEquals(mockEvent.LoginBrowser__c, logEntryArchive.LoginBrowser__c); + System.assertEquals(mockEvent.LoginHistoryId__c, logEntryArchive.LoginHistoryId__c); + System.assertEquals(mockEvent.LoginPlatform__c, logEntryArchive.LoginPlatform__c); + System.assertEquals(mockEvent.LoginType__c, logEntryArchive.LoginType__c); + System.assertEquals(mockEvent.LogoutUrl__c, logEntryArchive.LogoutUrl__c); + System.assertEquals(mockEvent.Message__c, logEntryArchive.Message__c); + System.assertEquals(mockEvent.NetworkId__c, logEntryArchive.NetworkId__c); + System.assertEquals(mockEvent.NetworkLoginUrl__c, logEntryArchive.NetworkLoginUrl__c); + System.assertEquals(mockEvent.NetworkLogoutUrl__c, logEntryArchive.NetworkLogoutUrl__c); + System.assertEquals(mockEvent.NetworkSelfRegistrationUrl__c, logEntryArchive.NetworkSelfRegistrationUrl__c); + System.assertEquals(mockEvent.NetworkUrlPathPrefix__c, logEntryArchive.NetworkUrlPathPrefix__c); + System.assertEquals(mockEvent.OrganizationDomainUrl__c, logEntryArchive.OrganizationDomainUrl__c); + System.assertEquals(mockEvent.OrganizationEnvironmentType__c, logEntryArchive.OrganizationEnvironmentType__c); + System.assertEquals(mockEvent.OrganizationId__c, logEntryArchive.OrganizationId__c); + System.assertEquals(mockEvent.OrganizationInstanceName__c, logEntryArchive.OrganizationInstanceName__c); + System.assertEquals(mockEvent.OrganizationName__c, logEntryArchive.OrganizationName__c); + System.assertEquals(mockEvent.OrganizationNamespacePrefix__c, logEntryArchive.OrganizationNamespacePrefix__c); + System.assertEquals(mockEvent.OrganizationType__c, logEntryArchive.OrganizationType__c); + System.assertEquals(mockEvent.OriginLocation__c, logEntryArchive.OriginLocation__c); + System.assertEquals(mockEvent.OriginType__c, logEntryArchive.OriginType__c); + System.assertEquals(mockEvent.ParentLogTransactionId__c, logEntryArchive.ParentLogTransactionId__c); + System.assertEquals(mockEvent.ProfileId__c, logEntryArchive.ProfileId__c); + System.assertEquals(mockEvent.ProfileName__c, logEntryArchive.ProfileName__c); + System.assertEquals(mockEvent.RecordCollectionType__c, logEntryArchive.RecordCollectionType__c); + System.assertEquals(mockEvent.RecordId__c, logEntryArchive.RecordId__c); + System.assertEquals(mockEvent.RecordJson__c, logEntryArchive.RecordJson__c); + System.assertEquals(mockEvent.RecordSObjectClassification__c, logEntryArchive.RecordSObjectClassification__c); + System.assertEquals(mockEvent.RecordSObjectType__c, logEntryArchive.RecordSObjectType__c); + System.assertEquals(mockEvent.RecordSObjectTypeNamespace__c, logEntryArchive.RecordSObjectTypeNamespace__c); + System.assertEquals(mockEvent.SessionId__c, logEntryArchive.SessionId__c); + System.assertEquals(mockEvent.SessionSecurityLevel__c, logEntryArchive.SessionSecurityLevel__c); + System.assertEquals(mockEvent.SessionType__c, logEntryArchive.SessionType__c); + System.assertEquals(mockEvent.SourceIp__c, logEntryArchive.SourceIp__c); + System.assertEquals(mockEvent.StackTrace__c, logEntryArchive.StackTrace__c); + System.assertEquals(mockEvent.SystemMode__c, logEntryArchive.SystemMode__c); + System.assertEquals(mockEvent.Tags__c, logEntryArchive.Tags__c); + System.assertEquals(mockEvent.ThemeDisplayed__c, logEntryArchive.ThemeDisplayed__c); + System.assertEquals(timestamp, logEntryArchive.Timestamp__c); + System.assertEquals(String.valueOf(timestamp.getTime()), logEntryArchive.TimestampString__c); + System.assertEquals(mockEvent.TimeZoneId__c, logEntryArchive.TimeZoneId__c); + System.assertEquals(mockEvent.TransactionEntryNumber__c, logEntryArchive.TransactionEntryNumber__c); + System.assertEquals(mockEvent.TransactionId__c, logEntryArchive.TransactionId__c); + System.assertEquals(mockEvent.TriggerOperationType__c, logEntryArchive.TriggerOperationType__c); + System.assertEquals(mockEvent.TriggerSObjectType__c, logEntryArchive.TriggerSObjectType__c); + System.assertEquals(mockEvent.UserLicenseDefinitionKey__c, logEntryArchive.UserLicenseDefinitionKey__c); + System.assertEquals(mockEvent.UserLicenseName__c, logEntryArchive.UserLicenseName__c); + System.assertEquals(mockEvent.UserLoggingLevel__c, logEntryArchive.UserLoggingLevel__c); + System.assertEquals(mockEvent.UserLoggingLevelOrdinal__c, logEntryArchive.UserLoggingLevelOrdinal__c); + System.assertEquals(mockEvent.UserRoleId__c, logEntryArchive.UserRoleId__c); + System.assertEquals(mockEvent.UserRoleName__c, logEntryArchive.UserRoleName__c); + System.assertEquals(mockEvent.UserType__c, logEntryArchive.UserType__c); + } +} diff --git a/nebula-logger/plugins/big-object-archiving/plugin/classes/LogEntryArchiveBuilder_Tests.cls-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/classes/LogEntryArchiveBuilder_Tests.cls-meta.xml new file mode 100644 index 000000000..891916bb0 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/classes/LogEntryArchiveBuilder_Tests.cls-meta.xml @@ -0,0 +1,5 @@ + + + 54.0 + Active + diff --git a/nebula-logger/core/main/configuration/customMetadata/LoggerParameter.AdditionalSaveMethods.md-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/customMetadata/LoggerParameter.AdditionalSaveMethodsBigObject.md-meta.xml similarity index 80% rename from nebula-logger/core/main/configuration/customMetadata/LoggerParameter.AdditionalSaveMethods.md-meta.xml rename to nebula-logger/plugins/big-object-archiving/plugin/customMetadata/LoggerParameter.AdditionalSaveMethodsBigObject.md-meta.xml index 582236567..a0b69971b 100644 --- a/nebula-logger/core/main/configuration/customMetadata/LoggerParameter.AdditionalSaveMethods.md-meta.xml +++ b/nebula-logger/plugins/big-object-archiving/plugin/customMetadata/LoggerParameter.AdditionalSaveMethodsBigObject.md-meta.xml @@ -4,7 +4,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" > - + true Description__c @@ -12,4 +12,8 @@ xsi:type="xsd:string" >An optional array of additional save methods to display when configuring the field LoggerSettings__c.DefaultSaveMethod__c in the LWC loggerSettings. When not configured, only the enum values of Logger.SaveMethod are used. This can be used to add new save methods that are provided by plugins. + + Value__c + BIG_OBJECT + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/customMetadata/LoggerPlugin.BigObjectArchiving.md-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/customMetadata/LoggerPlugin.BigObjectArchiving.md-meta.xml index ac4cb3453..0bf886df7 100644 --- a/nebula-logger/plugins/big-object-archiving/plugin/customMetadata/LoggerPlugin.BigObjectArchiving.md-meta.xml +++ b/nebula-logger/plugins/big-object-archiving/plugin/customMetadata/LoggerPlugin.BigObjectArchiving.md-meta.xml @@ -60,11 +60,11 @@ PluginApiName__c - TODO + LogEntryArchiveBuilder PluginType__c - Apex + SObject Handler - Apex VersionNumber__c diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/LogEntryArchive__b.object-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/LogEntryArchive__b.object-meta.xml new file mode 100644 index 000000000..cae976aa2 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/LogEntryArchive__b.object-meta.xml @@ -0,0 +1,7 @@ + + + InDevelopment + Big Object representation of Logger data, used as an alternative to the platform event LogEntryEvent__e + + Log Entry Archives + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/ApiVersion__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/ApiVersion__c.field-meta.xml new file mode 100644 index 000000000..2fcb22ff4 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/ApiVersion__c.field-meta.xml @@ -0,0 +1,13 @@ + + + ApiVersion__c + false + false + false + false + + 5 + false + Text + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/ComponentType__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/ComponentType__c.field-meta.xml new file mode 100644 index 000000000..630e3e4d3 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/ComponentType__c.field-meta.xml @@ -0,0 +1,13 @@ + + + ComponentType__c + false + false + false + false + + 255 + false + Text + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/DatabaseResultCollectionType__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/DatabaseResultCollectionType__c.field-meta.xml new file mode 100644 index 000000000..fd7897b92 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/DatabaseResultCollectionType__c.field-meta.xml @@ -0,0 +1,13 @@ + + + DatabaseResultCollectionType__c + false + false + false + false + + 255 + false + Text + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/DatabaseResultJson__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/DatabaseResultJson__c.field-meta.xml new file mode 100644 index 000000000..e93c8d59c --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/DatabaseResultJson__c.field-meta.xml @@ -0,0 +1,12 @@ + + + DatabaseResultJson__c + false + false + false + false + + 131072 + LongTextArea + 8 + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/DatabaseResultType__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/DatabaseResultType__c.field-meta.xml new file mode 100644 index 000000000..a23093471 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/DatabaseResultType__c.field-meta.xml @@ -0,0 +1,13 @@ + + + DatabaseResultType__c + false + false + false + false + + 255 + false + Text + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/EpochTimestamp__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/EpochTimestamp__c.field-meta.xml new file mode 100644 index 000000000..f736c6e9c --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/EpochTimestamp__c.field-meta.xml @@ -0,0 +1,15 @@ + + + EpochTimestamp__c + Timestamp in milliseconds elapsed since 1 January 1970 of the log event + false + false + false + false + + 18 + false + 0 + Number + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/ExceptionMessage__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/ExceptionMessage__c.field-meta.xml new file mode 100644 index 000000000..58e637f8b --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/ExceptionMessage__c.field-meta.xml @@ -0,0 +1,12 @@ + + + ExceptionMessage__c + false + false + false + false + + 131072 + LongTextArea + 8 + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/ExceptionStackTrace__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/ExceptionStackTrace__c.field-meta.xml new file mode 100644 index 000000000..92a815976 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/ExceptionStackTrace__c.field-meta.xml @@ -0,0 +1,12 @@ + + + ExceptionStackTrace__c + false + false + false + false + + 131072 + LongTextArea + 8 + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/ExceptionType__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/ExceptionType__c.field-meta.xml new file mode 100644 index 000000000..4f756f062 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/ExceptionType__c.field-meta.xml @@ -0,0 +1,13 @@ + + + ExceptionType__c + false + false + false + false + + 255 + false + Text + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsAggregateQueriesMax__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsAggregateQueriesMax__c.field-meta.xml new file mode 100644 index 000000000..c48a7b39b --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsAggregateQueriesMax__c.field-meta.xml @@ -0,0 +1,14 @@ + + + LimitsAggregateQueriesMax__c + false + false + false + false + + 10 + false + 0 + Number + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsAggregateQueriesUsed__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsAggregateQueriesUsed__c.field-meta.xml new file mode 100644 index 000000000..0236bbeef --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsAggregateQueriesUsed__c.field-meta.xml @@ -0,0 +1,14 @@ + + + LimitsAggregateQueriesUsed__c + false + false + false + false + + 10 + false + 0 + Number + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsAggregateQueryMax__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsAggregateQueryMax__c.field-meta.xml new file mode 100644 index 000000000..baa41fd2c --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsAggregateQueryMax__c.field-meta.xml @@ -0,0 +1,14 @@ + + + LimitsAggregateQueryMax__c + false + false + false + false + + 18 + false + 0 + Number + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsAsyncCallsMax__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsAsyncCallsMax__c.field-meta.xml new file mode 100644 index 000000000..26d17c8f0 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsAsyncCallsMax__c.field-meta.xml @@ -0,0 +1,14 @@ + + + LimitsAsyncCallsMax__c + false + false + false + false + + 10 + false + 0 + Number + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsAsyncCallsUsed__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsAsyncCallsUsed__c.field-meta.xml new file mode 100644 index 000000000..97cff1ca3 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsAsyncCallsUsed__c.field-meta.xml @@ -0,0 +1,14 @@ + + + LimitsAsyncCallsUsed__c + false + false + false + false + + 10 + false + 0 + Number + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsCalloutsMax__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsCalloutsMax__c.field-meta.xml new file mode 100644 index 000000000..14c80d67b --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsCalloutsMax__c.field-meta.xml @@ -0,0 +1,14 @@ + + + LimitsCalloutsMax__c + false + false + false + false + + 10 + false + 0 + Number + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsCalloutsUsed__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsCalloutsUsed__c.field-meta.xml new file mode 100644 index 000000000..b308a8055 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsCalloutsUsed__c.field-meta.xml @@ -0,0 +1,14 @@ + + + LimitsCalloutsUsed__c + false + false + false + false + + 10 + false + 0 + Number + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsCpuTimeMax__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsCpuTimeMax__c.field-meta.xml new file mode 100644 index 000000000..c40ac1a02 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsCpuTimeMax__c.field-meta.xml @@ -0,0 +1,14 @@ + + + LimitsCpuTimeMax__c + false + false + false + false + + 10 + false + 0 + Number + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsCpuTimeUsed__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsCpuTimeUsed__c.field-meta.xml new file mode 100644 index 000000000..032c505c7 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsCpuTimeUsed__c.field-meta.xml @@ -0,0 +1,14 @@ + + + LimitsCpuTimeUsed__c + false + false + false + false + + 10 + false + 0 + Number + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsDmlRowsMax__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsDmlRowsMax__c.field-meta.xml new file mode 100644 index 000000000..7d41b3d6e --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsDmlRowsMax__c.field-meta.xml @@ -0,0 +1,14 @@ + + + LimitsDmlRowsMax__c + false + false + false + false + + 10 + false + 0 + Number + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsDmlRowsUsed__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsDmlRowsUsed__c.field-meta.xml new file mode 100644 index 000000000..ff2ed5c67 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsDmlRowsUsed__c.field-meta.xml @@ -0,0 +1,14 @@ + + + LimitsDmlRowsUsed__c + false + false + false + false + + 10 + false + 0 + Number + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsDmlStatementsMax__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsDmlStatementsMax__c.field-meta.xml new file mode 100644 index 000000000..f69d4b30f --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsDmlStatementsMax__c.field-meta.xml @@ -0,0 +1,14 @@ + + + LimitsDmlStatementsMax__c + false + false + false + false + + 10 + false + 0 + Number + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsDmlStatementsUsed__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsDmlStatementsUsed__c.field-meta.xml new file mode 100644 index 000000000..d4f1aa7fc --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsDmlStatementsUsed__c.field-meta.xml @@ -0,0 +1,14 @@ + + + LimitsDmlStatementsUsed__c + false + false + false + false + + 10 + false + 0 + Number + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsEmailInvocationsMax__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsEmailInvocationsMax__c.field-meta.xml new file mode 100644 index 000000000..4dc6bb729 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsEmailInvocationsMax__c.field-meta.xml @@ -0,0 +1,14 @@ + + + LimitsEmailInvocationsMax__c + false + false + false + false + + 10 + false + 0 + Number + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsEmailInvocationsUsed__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsEmailInvocationsUsed__c.field-meta.xml new file mode 100644 index 000000000..1fbc1a543 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsEmailInvocationsUsed__c.field-meta.xml @@ -0,0 +1,14 @@ + + + LimitsEmailInvocationsUsed__c + false + false + false + false + + 10 + false + 0 + Number + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsFutureCallsMax__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsFutureCallsMax__c.field-meta.xml new file mode 100644 index 000000000..fb6fa9d20 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsFutureCallsMax__c.field-meta.xml @@ -0,0 +1,14 @@ + + + LimitsFutureCallsMax__c + false + false + false + false + + 10 + false + 0 + Number + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsFutureCallsUsed__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsFutureCallsUsed__c.field-meta.xml new file mode 100644 index 000000000..e6c533025 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsFutureCallsUsed__c.field-meta.xml @@ -0,0 +1,14 @@ + + + LimitsFutureCallsUsed__c + false + false + false + false + + 10 + false + 0 + Number + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsHeapSizeMax__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsHeapSizeMax__c.field-meta.xml new file mode 100644 index 000000000..a5de0a8a7 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsHeapSizeMax__c.field-meta.xml @@ -0,0 +1,14 @@ + + + LimitsHeapSizeMax__c + false + false + false + false + + 10 + false + 0 + Number + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsHeapSizeUsed__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsHeapSizeUsed__c.field-meta.xml new file mode 100644 index 000000000..c49e08bc9 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsHeapSizeUsed__c.field-meta.xml @@ -0,0 +1,14 @@ + + + LimitsHeapSizeUsed__c + false + false + false + false + + 10 + false + 0 + Number + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsMobilePushApexCallsMax__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsMobilePushApexCallsMax__c.field-meta.xml new file mode 100644 index 000000000..f9056b156 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsMobilePushApexCallsMax__c.field-meta.xml @@ -0,0 +1,14 @@ + + + LimitsMobilePushApexCallsMax__c + false + false + false + false + + 10 + false + 0 + Number + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsMobilePushApexCallsUsed__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsMobilePushApexCallsUsed__c.field-meta.xml new file mode 100644 index 000000000..3f2dd5ae3 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsMobilePushApexCallsUsed__c.field-meta.xml @@ -0,0 +1,14 @@ + + + LimitsMobilePushApexCallsUsed__c + false + false + false + false + + 10 + false + 0 + Number + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsPublishImmediateDmlStatementsMax__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsPublishImmediateDmlStatementsMax__c.field-meta.xml new file mode 100644 index 000000000..6eccaf27d --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsPublishImmediateDmlStatementsMax__c.field-meta.xml @@ -0,0 +1,14 @@ + + + LimitsPublishImmediateDmlStatementsMax__c + false + false + false + false + + 10 + false + 0 + Number + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsPublishImmediateDmlStatementsUsed__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsPublishImmediateDmlStatementsUsed__c.field-meta.xml new file mode 100644 index 000000000..68d11b8b0 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsPublishImmediateDmlStatementsUsed__c.field-meta.xml @@ -0,0 +1,14 @@ + + + LimitsPublishImmediateDmlStatementsUsed__c + false + false + false + false + + 10 + false + 0 + Number + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsQueueableJobsMax__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsQueueableJobsMax__c.field-meta.xml new file mode 100644 index 000000000..f561b7f4e --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsQueueableJobsMax__c.field-meta.xml @@ -0,0 +1,14 @@ + + + LimitsQueueableJobsMax__c + false + false + false + false + + 10 + false + 0 + Number + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsQueueableJobsUsed__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsQueueableJobsUsed__c.field-meta.xml new file mode 100644 index 000000000..809e5c6b6 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsQueueableJobsUsed__c.field-meta.xml @@ -0,0 +1,14 @@ + + + LimitsQueueableJobsUsed__c + false + false + false + false + + 10 + false + 0 + Number + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsSoqlQueriesMax__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsSoqlQueriesMax__c.field-meta.xml new file mode 100644 index 000000000..40c770ab8 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsSoqlQueriesMax__c.field-meta.xml @@ -0,0 +1,14 @@ + + + LimitsSoqlQueriesMax__c + false + false + false + false + + 10 + false + 0 + Number + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsSoqlQueriesUsed__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsSoqlQueriesUsed__c.field-meta.xml new file mode 100644 index 000000000..80097b9d3 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsSoqlQueriesUsed__c.field-meta.xml @@ -0,0 +1,14 @@ + + + LimitsSoqlQueriesUsed__c + false + false + false + false + + 10 + false + 0 + Number + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsSoqlQueryLocatorRowsMax__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsSoqlQueryLocatorRowsMax__c.field-meta.xml new file mode 100644 index 000000000..beb3ab6bc --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsSoqlQueryLocatorRowsMax__c.field-meta.xml @@ -0,0 +1,14 @@ + + + LimitsSoqlQueryLocatorRowsMax__c + false + false + false + false + + 10 + false + 0 + Number + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsSoqlQueryLocatorRowsUsed__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsSoqlQueryLocatorRowsUsed__c.field-meta.xml new file mode 100644 index 000000000..43d210d73 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsSoqlQueryLocatorRowsUsed__c.field-meta.xml @@ -0,0 +1,14 @@ + + + LimitsSoqlQueryLocatorRowsUsed__c + false + false + false + false + + 10 + false + 0 + Number + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsSoqlQueryRowsMax__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsSoqlQueryRowsMax__c.field-meta.xml new file mode 100644 index 000000000..92ebedf2f --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsSoqlQueryRowsMax__c.field-meta.xml @@ -0,0 +1,14 @@ + + + LimitsSoqlQueryRowsMax__c + false + false + false + false + + 10 + false + 0 + Number + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsSoqlQueryRowsUsed__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsSoqlQueryRowsUsed__c.field-meta.xml new file mode 100644 index 000000000..23f800315 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsSoqlQueryRowsUsed__c.field-meta.xml @@ -0,0 +1,14 @@ + + + LimitsSoqlQueryRowsUsed__c + false + false + false + false + + 10 + false + 0 + Number + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsSoslSearchesMax__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsSoslSearchesMax__c.field-meta.xml new file mode 100644 index 000000000..7e153f613 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsSoslSearchesMax__c.field-meta.xml @@ -0,0 +1,14 @@ + + + LimitsSoslSearchesMax__c + false + false + false + false + + 10 + false + 0 + Number + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsSoslSearchesUsed__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsSoslSearchesUsed__c.field-meta.xml new file mode 100644 index 000000000..1bbc95895 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LimitsSoslSearchesUsed__c.field-meta.xml @@ -0,0 +1,14 @@ + + + LimitsSoslSearchesUsed__c + false + false + false + false + + 10 + false + 0 + Number + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/Locale__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/Locale__c.field-meta.xml new file mode 100644 index 000000000..d517bef28 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/Locale__c.field-meta.xml @@ -0,0 +1,13 @@ + + + Locale__c + false + false + false + false + + 255 + false + Text + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LoggedById__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LoggedById__c.field-meta.xml new file mode 100644 index 000000000..a718d07f9 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LoggedById__c.field-meta.xml @@ -0,0 +1,13 @@ + + + LoggedById__c + false + false + false + false + + 18 + false + Text + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LoggedByUsername__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LoggedByUsername__c.field-meta.xml new file mode 100644 index 000000000..baa143399 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LoggedByUsername__c.field-meta.xml @@ -0,0 +1,13 @@ + + + LoggedByUsername__c + false + false + false + false + + 255 + false + Text + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LoggedBy__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LoggedBy__c.field-meta.xml new file mode 100644 index 000000000..d0676967f --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LoggedBy__c.field-meta.xml @@ -0,0 +1,13 @@ + + + LoggedBy__c + false + false + false + false + + 18 + true + Text + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LoggerVersionNumber__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LoggerVersionNumber__c.field-meta.xml new file mode 100644 index 000000000..0b7f8e644 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LoggerVersionNumber__c.field-meta.xml @@ -0,0 +1,13 @@ + + + LoggerVersionNumber__c + false + false + false + false + + 14 + false + Text + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LoggingLevelOrdinal__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LoggingLevelOrdinal__c.field-meta.xml new file mode 100644 index 000000000..eb0ddbf32 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LoggingLevelOrdinal__c.field-meta.xml @@ -0,0 +1,14 @@ + + + LoggingLevelOrdinal__c + false + false + false + false + + 10 + false + 0 + Number + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LoggingLevel__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LoggingLevel__c.field-meta.xml new file mode 100644 index 000000000..8521ce9a5 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LoggingLevel__c.field-meta.xml @@ -0,0 +1,13 @@ + + + LoggingLevel__c + false + false + false + false + + 10 + true + Text + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LoginApplication__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LoginApplication__c.field-meta.xml new file mode 100644 index 000000000..4083d26d0 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LoginApplication__c.field-meta.xml @@ -0,0 +1,13 @@ + + + LoginApplication__c + false + false + false + false + + 255 + false + Text + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LoginBrowser__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LoginBrowser__c.field-meta.xml new file mode 100644 index 000000000..e43851995 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LoginBrowser__c.field-meta.xml @@ -0,0 +1,13 @@ + + + LoginBrowser__c + false + false + false + false + + 255 + false + Text + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LoginDomain__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LoginDomain__c.field-meta.xml new file mode 100644 index 000000000..29706601a --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LoginDomain__c.field-meta.xml @@ -0,0 +1,13 @@ + + + LoginDomain__c + false + false + false + false + + 255 + false + Text + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LoginHistoryId__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LoginHistoryId__c.field-meta.xml new file mode 100644 index 000000000..03a1e205f --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LoginHistoryId__c.field-meta.xml @@ -0,0 +1,13 @@ + + + LoginHistoryId__c + false + false + false + false + + 18 + false + Text + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LoginPlatform__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LoginPlatform__c.field-meta.xml new file mode 100644 index 000000000..149c8a22f --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LoginPlatform__c.field-meta.xml @@ -0,0 +1,13 @@ + + + LoginPlatform__c + false + false + false + false + + 255 + false + Text + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LoginType__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LoginType__c.field-meta.xml new file mode 100644 index 000000000..77b991491 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LoginType__c.field-meta.xml @@ -0,0 +1,13 @@ + + + LoginType__c + false + false + false + false + + 255 + false + Text + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LogoutUrl__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LogoutUrl__c.field-meta.xml new file mode 100644 index 000000000..6ff3d68af --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/LogoutUrl__c.field-meta.xml @@ -0,0 +1,13 @@ + + + LogoutUrl__c + false + false + false + false + + 255 + false + Text + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/Message__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/Message__c.field-meta.xml new file mode 100644 index 000000000..e0d08fd0a --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/Message__c.field-meta.xml @@ -0,0 +1,12 @@ + + + Message__c + false + false + false + false + + 131072 + LongTextArea + 8 + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/NetworkId__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/NetworkId__c.field-meta.xml new file mode 100644 index 000000000..010ec3257 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/NetworkId__c.field-meta.xml @@ -0,0 +1,13 @@ + + + NetworkId__c + false + false + false + false + + 18 + false + Text + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/NetworkLoginUrl__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/NetworkLoginUrl__c.field-meta.xml new file mode 100644 index 000000000..1578c583a --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/NetworkLoginUrl__c.field-meta.xml @@ -0,0 +1,13 @@ + + + NetworkLoginUrl__c + false + false + false + false + + 255 + false + Text + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/NetworkLogoutUrl__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/NetworkLogoutUrl__c.field-meta.xml new file mode 100644 index 000000000..153ef3acb --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/NetworkLogoutUrl__c.field-meta.xml @@ -0,0 +1,13 @@ + + + NetworkLogoutUrl__c + false + false + false + false + + 255 + false + Text + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/NetworkName__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/NetworkName__c.field-meta.xml new file mode 100644 index 000000000..df080b21f --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/NetworkName__c.field-meta.xml @@ -0,0 +1,14 @@ + + + NetworkName__c + The name of the user's Community site (based on NetworkId). + false + false + false + false + + 255 + false + Text + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/NetworkSelfRegistrationUrl__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/NetworkSelfRegistrationUrl__c.field-meta.xml new file mode 100644 index 000000000..5b51b2a22 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/NetworkSelfRegistrationUrl__c.field-meta.xml @@ -0,0 +1,13 @@ + + + NetworkSelfRegistrationUrl__c + false + false + false + false + + 255 + false + Text + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/NetworkUrlPathPrefix__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/NetworkUrlPathPrefix__c.field-meta.xml new file mode 100644 index 000000000..956f9fd12 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/NetworkUrlPathPrefix__c.field-meta.xml @@ -0,0 +1,15 @@ + + + NetworkUrlPathPrefix__c + The UrlPathPrefix is a unique string at the end of the URL for this community. For example, in the community URL CommunitiesSubdomainName.force.com/customers, customers is the UrlPathPrefix. + false + false + false + false + + 255 + false + Text + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/OrganizationDomainUrl__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/OrganizationDomainUrl__c.field-meta.xml new file mode 100644 index 000000000..f0b3e20b4 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/OrganizationDomainUrl__c.field-meta.xml @@ -0,0 +1,14 @@ + + + OrganizationDomainUrl__c + The value returned from Url..getOrgDomainUrl() + false + false + false + false + + 255 + false + Text + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/OrganizationEnvironmentType__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/OrganizationEnvironmentType__c.field-meta.xml new file mode 100644 index 000000000..1093ecad9 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/OrganizationEnvironmentType__c.field-meta.xml @@ -0,0 +1,13 @@ + + + OrganizationEnvironmentType__c + false + false + false + false + + 255 + false + Text + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/OrganizationId__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/OrganizationId__c.field-meta.xml new file mode 100644 index 000000000..f756fe0c1 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/OrganizationId__c.field-meta.xml @@ -0,0 +1,13 @@ + + + OrganizationId__c + false + false + false + false + + 18 + false + Text + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/OrganizationInstanceName__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/OrganizationInstanceName__c.field-meta.xml new file mode 100644 index 000000000..c60401ab6 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/OrganizationInstanceName__c.field-meta.xml @@ -0,0 +1,13 @@ + + + OrganizationInstanceName__c + false + false + false + false + + 255 + false + Text + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/OrganizationName__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/OrganizationName__c.field-meta.xml new file mode 100644 index 000000000..ecf79375a --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/OrganizationName__c.field-meta.xml @@ -0,0 +1,13 @@ + + + OrganizationName__c + false + false + false + false + + 255 + false + Text + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/OrganizationNamespacePrefix__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/OrganizationNamespacePrefix__c.field-meta.xml new file mode 100644 index 000000000..f2b9d979f --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/OrganizationNamespacePrefix__c.field-meta.xml @@ -0,0 +1,13 @@ + + + OrganizationNamespacePrefix__c + false + false + false + false + + 255 + false + Text + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/OrganizationType__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/OrganizationType__c.field-meta.xml new file mode 100644 index 000000000..51a65571a --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/OrganizationType__c.field-meta.xml @@ -0,0 +1,13 @@ + + + OrganizationType__c + false + false + false + false + + 255 + false + Text + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/OriginLocation__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/OriginLocation__c.field-meta.xml new file mode 100644 index 000000000..8cdf04494 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/OriginLocation__c.field-meta.xml @@ -0,0 +1,13 @@ + + + OriginLocation__c + false + false + false + false + + 255 + false + Text + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/OriginType__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/OriginType__c.field-meta.xml new file mode 100644 index 000000000..0f75087c1 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/OriginType__c.field-meta.xml @@ -0,0 +1,13 @@ + + + OriginType__c + false + false + false + false + + 255 + false + Text + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/ParentLogTransactionId__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/ParentLogTransactionId__c.field-meta.xml new file mode 100644 index 000000000..272294e8a --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/ParentLogTransactionId__c.field-meta.xml @@ -0,0 +1,13 @@ + + + ParentLogTransactionId__c + false + false + false + false + + 36 + false + Text + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/ProfileId__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/ProfileId__c.field-meta.xml new file mode 100644 index 000000000..096ee2ac7 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/ProfileId__c.field-meta.xml @@ -0,0 +1,13 @@ + + + ProfileId__c + false + false + false + false + + 18 + false + Text + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/ProfileName__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/ProfileName__c.field-meta.xml new file mode 100644 index 000000000..404cb57d3 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/ProfileName__c.field-meta.xml @@ -0,0 +1,13 @@ + + + ProfileName__c + false + false + false + false + + 255 + false + Text + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/RecordCollectionType__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/RecordCollectionType__c.field-meta.xml new file mode 100644 index 000000000..cf8580801 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/RecordCollectionType__c.field-meta.xml @@ -0,0 +1,13 @@ + + + RecordCollectionType__c + false + false + false + false + + 255 + false + Text + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/RecordId__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/RecordId__c.field-meta.xml new file mode 100644 index 000000000..f13aee872 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/RecordId__c.field-meta.xml @@ -0,0 +1,15 @@ + + + RecordId__c + The ID of the record associated with a particular log entry. This is used for addRecordDebugEntry & addRecordExceptionEntry methods + false + false + false + false + + 18 + false + Text + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/RecordJson__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/RecordJson__c.field-meta.xml new file mode 100644 index 000000000..7dbd491ef --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/RecordJson__c.field-meta.xml @@ -0,0 +1,12 @@ + + + RecordJson__c + false + false + false + false + + 131072 + LongTextArea + 8 + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/RecordSObjectClassification__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/RecordSObjectClassification__c.field-meta.xml new file mode 100644 index 000000000..487cb8082 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/RecordSObjectClassification__c.field-meta.xml @@ -0,0 +1,13 @@ + + + RecordSObjectClassification__c + false + false + false + false + + 255 + false + Text + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/RecordSObjectTypeNamespace__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/RecordSObjectTypeNamespace__c.field-meta.xml new file mode 100644 index 000000000..d0c52839c --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/RecordSObjectTypeNamespace__c.field-meta.xml @@ -0,0 +1,13 @@ + + + RecordSObjectTypeNamespace__c + false + false + false + false + + 255 + false + Text + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/RecordSObjectType__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/RecordSObjectType__c.field-meta.xml new file mode 100644 index 000000000..ec1b5d235 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/RecordSObjectType__c.field-meta.xml @@ -0,0 +1,13 @@ + + + RecordSObjectType__c + false + false + false + false + + 255 + false + Text + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/Scenario__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/Scenario__c.field-meta.xml new file mode 100644 index 000000000..8aebe4684 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/Scenario__c.field-meta.xml @@ -0,0 +1,13 @@ + + + Scenario__c + false + false + false + false + + 255 + false + Text + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/SessionId__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/SessionId__c.field-meta.xml new file mode 100644 index 000000000..e82404eee --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/SessionId__c.field-meta.xml @@ -0,0 +1,13 @@ + + + SessionId__c + false + false + false + false + + 120 + false + Text + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/SessionSecurityLevel__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/SessionSecurityLevel__c.field-meta.xml new file mode 100644 index 000000000..4b4e2f3a8 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/SessionSecurityLevel__c.field-meta.xml @@ -0,0 +1,13 @@ + + + SessionSecurityLevel__c + false + false + false + false + + 255 + false + Text + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/SessionType__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/SessionType__c.field-meta.xml new file mode 100644 index 000000000..8d3428ab3 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/SessionType__c.field-meta.xml @@ -0,0 +1,13 @@ + + + SessionType__c + false + false + false + false + + 255 + false + Text + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/SourceIp__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/SourceIp__c.field-meta.xml new file mode 100644 index 000000000..a5fca8079 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/SourceIp__c.field-meta.xml @@ -0,0 +1,13 @@ + + + SourceIp__c + false + false + false + false + + 255 + false + Text + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/StackTrace__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/StackTrace__c.field-meta.xml new file mode 100644 index 000000000..a6bf065df --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/StackTrace__c.field-meta.xml @@ -0,0 +1,12 @@ + + + StackTrace__c + false + false + false + false + + 131072 + LongTextArea + 8 + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/SystemMode__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/SystemMode__c.field-meta.xml new file mode 100644 index 000000000..13c15946d --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/SystemMode__c.field-meta.xml @@ -0,0 +1,13 @@ + + + SystemMode__c + false + false + false + false + + 255 + false + Text + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/Tags__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/Tags__c.field-meta.xml new file mode 100644 index 000000000..41c765352 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/Tags__c.field-meta.xml @@ -0,0 +1,12 @@ + + + Tags__c + false + false + false + false + + 131072 + LongTextArea + 8 + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/ThemeDisplayed__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/ThemeDisplayed__c.field-meta.xml new file mode 100644 index 000000000..ca100f422 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/ThemeDisplayed__c.field-meta.xml @@ -0,0 +1,13 @@ + + + ThemeDisplayed__c + false + false + false + false + + 255 + false + Text + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/TimeZoneId__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/TimeZoneId__c.field-meta.xml new file mode 100644 index 000000000..b36923303 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/TimeZoneId__c.field-meta.xml @@ -0,0 +1,13 @@ + + + TimeZoneId__c + false + false + false + false + + 255 + false + Text + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/TimeZoneName__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/TimeZoneName__c.field-meta.xml new file mode 100644 index 000000000..f544a9094 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/TimeZoneName__c.field-meta.xml @@ -0,0 +1,13 @@ + + + TimeZoneName__c + false + false + false + false + + 255 + false + Text + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/TimestampString__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/TimestampString__c.field-meta.xml new file mode 100644 index 000000000..c4e268528 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/TimestampString__c.field-meta.xml @@ -0,0 +1,15 @@ + + + TimestampString__c + This field is used to circumvent a platform limitation - platform event datetimes are not accurately transferred to Apex triggers. This field stores a string version of the timestamp, which is then converted back to a datetime in Apex triggers. + false + false + false + false + + 40 + false + Text + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/Timestamp__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/Timestamp__c.field-meta.xml new file mode 100644 index 000000000..7832d4511 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/Timestamp__c.field-meta.xml @@ -0,0 +1,8 @@ + + + Timestamp__c + false + + true + DateTime + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/TransactionEntryNumber__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/TransactionEntryNumber__c.field-meta.xml new file mode 100644 index 000000000..1a57a3a12 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/TransactionEntryNumber__c.field-meta.xml @@ -0,0 +1,15 @@ + + + TransactionEntryNumber__c + The sequential number of this log entry within the transaction + false + false + false + false + + 10 + true + 0 + Number + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/TransactionId__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/TransactionId__c.field-meta.xml new file mode 100644 index 000000000..1b6172bad --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/TransactionId__c.field-meta.xml @@ -0,0 +1,10 @@ + + + TransactionId__c + false + + 36 + true + Text + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/TriggerOperationType__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/TriggerOperationType__c.field-meta.xml new file mode 100644 index 000000000..ecb00a124 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/TriggerOperationType__c.field-meta.xml @@ -0,0 +1,13 @@ + + + TriggerOperationType__c + false + false + false + false + + 255 + false + Text + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/TriggerSObjectType__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/TriggerSObjectType__c.field-meta.xml new file mode 100644 index 000000000..5530a9458 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/TriggerSObjectType__c.field-meta.xml @@ -0,0 +1,13 @@ + + + TriggerSObjectType__c + false + false + false + false + + 255 + false + Text + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/UserLicenseDefinitionKey__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/UserLicenseDefinitionKey__c.field-meta.xml new file mode 100644 index 000000000..c766274c7 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/UserLicenseDefinitionKey__c.field-meta.xml @@ -0,0 +1,14 @@ + + + UserLicenseDefinitionKey__c + https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_userlicense.htm + false + false + false + false + + 255 + false + Text + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/UserLicenseId__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/UserLicenseId__c.field-meta.xml new file mode 100644 index 000000000..11acbc903 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/UserLicenseId__c.field-meta.xml @@ -0,0 +1,13 @@ + + + UserLicenseId__c + false + false + false + false + + 18 + false + Text + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/UserLicenseName__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/UserLicenseName__c.field-meta.xml new file mode 100644 index 000000000..286d69d61 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/UserLicenseName__c.field-meta.xml @@ -0,0 +1,13 @@ + + + UserLicenseName__c + false + false + false + false + + 255 + false + Text + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/UserLoggingLevelOrdinal__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/UserLoggingLevelOrdinal__c.field-meta.xml new file mode 100644 index 000000000..982cb328b --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/UserLoggingLevelOrdinal__c.field-meta.xml @@ -0,0 +1,14 @@ + + + UserLoggingLevelOrdinal__c + false + false + false + false + + 10 + false + 0 + Number + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/UserLoggingLevel__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/UserLoggingLevel__c.field-meta.xml new file mode 100644 index 000000000..fdddd0226 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/UserLoggingLevel__c.field-meta.xml @@ -0,0 +1,13 @@ + + + UserLoggingLevel__c + false + false + false + false + + 255 + false + Text + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/UserRoleId__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/UserRoleId__c.field-meta.xml new file mode 100644 index 000000000..8207f3b07 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/UserRoleId__c.field-meta.xml @@ -0,0 +1,13 @@ + + + UserRoleId__c + false + false + false + false + + 18 + false + Text + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/UserRoleName__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/UserRoleName__c.field-meta.xml new file mode 100644 index 000000000..e090524ce --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/UserRoleName__c.field-meta.xml @@ -0,0 +1,13 @@ + + + UserRoleName__c + false + false + false + false + + 255 + false + Text + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/UserType__c.field-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/UserType__c.field-meta.xml new file mode 100644 index 000000000..df7315ed9 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/fields/UserType__c.field-meta.xml @@ -0,0 +1,13 @@ + + + UserType__c + false + false + false + false + + 255 + false + Text + false + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/indexes/Logged_By_Logging_Level_Timestamp_Index.indexe-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/indexes/Logged_By_Logging_Level_Timestamp_Index.indexe-meta.xml new file mode 100644 index 000000000..66d88e1a6 --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/objects/LogEntryArchive__b/indexes/Logged_By_Logging_Level_Timestamp_Index.indexe-meta.xml @@ -0,0 +1,17 @@ + + + Logged_By_Logging_Level_Timestamp_Index + + LoggedBy__c + ASC + + + LoggingLevel__c + ASC + + + Timestamp__c + DESC + + + diff --git a/nebula-logger/plugins/big-object-archiving/plugin/permissionsets/LoggerLogEntryArchiveAdmin.permissionset-meta.xml b/nebula-logger/plugins/big-object-archiving/plugin/permissionsets/LoggerLogEntryArchiveAdmin.permissionset-meta.xml new file mode 100644 index 000000000..55126465e --- /dev/null +++ b/nebula-logger/plugins/big-object-archiving/plugin/permissionsets/LoggerLogEntryArchiveAdmin.permissionset-meta.xml @@ -0,0 +1,520 @@ + + + Provides admin access to the BigObject LogEntryEventArchive__b, included with the BigObject plugin for Nebula Logger + + true + LogEntryArchive__b.ApiVersion__c + true + + + true + LogEntryArchive__b.ComponentType__c + true + + + true + LogEntryArchive__b.DatabaseResultCollectionType__c + true + + + true + LogEntryArchive__b.DatabaseResultJson__c + true + + + true + LogEntryArchive__b.DatabaseResultType__c + true + + + true + LogEntryArchive__b.EpochTimestamp__c + true + + + true + LogEntryArchive__b.ExceptionMessage__c + true + + + true + LogEntryArchive__b.ExceptionStackTrace__c + true + + + true + LogEntryArchive__b.ExceptionType__c + true + + + true + LogEntryArchive__b.LimitsAggregateQueriesMax__c + true + + + true + LogEntryArchive__b.LimitsAggregateQueriesUsed__c + true + + + true + LogEntryArchive__b.LimitsAggregateQueryMax__c + true + + + true + LogEntryArchive__b.LimitsAsyncCallsMax__c + true + + + true + LogEntryArchive__b.LimitsAsyncCallsUsed__c + true + + + true + LogEntryArchive__b.LimitsCalloutsMax__c + true + + + true + LogEntryArchive__b.LimitsCalloutsUsed__c + true + + + true + LogEntryArchive__b.LimitsCpuTimeMax__c + true + + + true + LogEntryArchive__b.LimitsCpuTimeUsed__c + true + + + true + LogEntryArchive__b.LimitsDmlRowsMax__c + true + + + true + LogEntryArchive__b.LimitsDmlRowsUsed__c + true + + + true + LogEntryArchive__b.LimitsDmlStatementsMax__c + true + + + true + LogEntryArchive__b.LimitsDmlStatementsUsed__c + true + + + true + LogEntryArchive__b.LimitsEmailInvocationsMax__c + true + + + true + LogEntryArchive__b.LimitsEmailInvocationsUsed__c + true + + + true + LogEntryArchive__b.LimitsFutureCallsMax__c + true + + + true + LogEntryArchive__b.LimitsFutureCallsUsed__c + true + + + true + LogEntryArchive__b.LimitsHeapSizeMax__c + true + + + true + LogEntryArchive__b.LimitsHeapSizeUsed__c + true + + + true + LogEntryArchive__b.LimitsMobilePushApexCallsMax__c + true + + + true + LogEntryArchive__b.LimitsMobilePushApexCallsUsed__c + true + + + true + LogEntryArchive__b.LimitsPublishImmediateDmlStatementsMax__c + true + + + true + LogEntryArchive__b.LimitsPublishImmediateDmlStatementsUsed__c + true + + + true + LogEntryArchive__b.LimitsQueueableJobsMax__c + true + + + true + LogEntryArchive__b.LimitsQueueableJobsUsed__c + true + + + true + LogEntryArchive__b.LimitsSoqlQueriesMax__c + true + + + true + LogEntryArchive__b.LimitsSoqlQueriesUsed__c + true + + + true + LogEntryArchive__b.LimitsSoqlQueryLocatorRowsMax__c + true + + + true + LogEntryArchive__b.LimitsSoqlQueryLocatorRowsUsed__c + true + + + true + LogEntryArchive__b.LimitsSoqlQueryRowsMax__c + true + + + true + LogEntryArchive__b.LimitsSoqlQueryRowsUsed__c + true + + + true + LogEntryArchive__b.LimitsSoslSearchesMax__c + true + + + true + LogEntryArchive__b.LimitsSoslSearchesUsed__c + true + + + true + LogEntryArchive__b.Locale__c + true + + + true + LogEntryArchive__b.LoggedByUsername__c + true + + + true + LogEntryArchive__b.LoggedById__c + true + + + true + LogEntryArchive__b.LoggerVersionNumber__c + true + + + true + LogEntryArchive__b.LoggingLevelOrdinal__c + true + + + true + LogEntryArchive__b.LoginApplication__c + true + + + true + LogEntryArchive__b.LoginBrowser__c + true + + + true + LogEntryArchive__b.LoginDomain__c + true + + + true + LogEntryArchive__b.LoginHistoryId__c + true + + + true + LogEntryArchive__b.LoginPlatform__c + true + + + true + LogEntryArchive__b.LoginType__c + true + + + true + LogEntryArchive__b.LogoutUrl__c + true + + + true + LogEntryArchive__b.Message__c + true + + + true + LogEntryArchive__b.NetworkId__c + true + + + true + LogEntryArchive__b.NetworkLoginUrl__c + true + + + true + LogEntryArchive__b.NetworkLogoutUrl__c + true + + + true + LogEntryArchive__b.NetworkName__c + true + + + true + LogEntryArchive__b.NetworkSelfRegistrationUrl__c + true + + + true + LogEntryArchive__b.NetworkUrlPathPrefix__c + true + + + true + LogEntryArchive__b.OrganizationDomainUrl__c + true + + + true + LogEntryArchive__b.OrganizationEnvironmentType__c + true + + + true + LogEntryArchive__b.OrganizationId__c + true + + + true + LogEntryArchive__b.OrganizationInstanceName__c + true + + + true + LogEntryArchive__b.OrganizationName__c + true + + + true + LogEntryArchive__b.OrganizationNamespacePrefix__c + true + + + true + LogEntryArchive__b.OrganizationType__c + true + + + true + LogEntryArchive__b.OriginLocation__c + true + + + true + LogEntryArchive__b.OriginType__c + true + + + true + LogEntryArchive__b.ParentLogTransactionId__c + true + + + true + LogEntryArchive__b.ProfileId__c + true + + + true + LogEntryArchive__b.ProfileName__c + true + + + true + LogEntryArchive__b.RecordCollectionType__c + true + + + true + LogEntryArchive__b.RecordId__c + true + + + true + LogEntryArchive__b.RecordJson__c + true + + + true + LogEntryArchive__b.RecordSObjectClassification__c + true + + + true + LogEntryArchive__b.RecordSObjectTypeNamespace__c + true + + + true + LogEntryArchive__b.RecordSObjectType__c + true + + + true + LogEntryArchive__b.Scenario__c + true + + + true + LogEntryArchive__b.SessionId__c + true + + + true + LogEntryArchive__b.SessionSecurityLevel__c + true + + + true + LogEntryArchive__b.SessionType__c + true + + + true + LogEntryArchive__b.SourceIp__c + true + + + true + LogEntryArchive__b.StackTrace__c + true + + + true + LogEntryArchive__b.SystemMode__c + true + + + true + LogEntryArchive__b.Tags__c + true + + + true + LogEntryArchive__b.ThemeDisplayed__c + true + + + true + LogEntryArchive__b.TimeZoneId__c + true + + + true + LogEntryArchive__b.TimeZoneName__c + true + + + true + LogEntryArchive__b.TimestampString__c + true + + + true + LogEntryArchive__b.TriggerOperationType__c + true + + + true + LogEntryArchive__b.TriggerSObjectType__c + true + + + true + LogEntryArchive__b.UserLicenseDefinitionKey__c + true + + + true + LogEntryArchive__b.UserLicenseId__c + true + + + true + LogEntryArchive__b.UserLicenseName__c + true + + + true + LogEntryArchive__b.UserLoggingLevelOrdinal__c + true + + + true + LogEntryArchive__b.UserLoggingLevel__c + true + + + true + LogEntryArchive__b.UserRoleId__c + true + + + true + LogEntryArchive__b.UserRoleName__c + true + + + true + LogEntryArchive__b.UserType__c + true + + false + + + true + true + false + true + false + LogEntryArchive__b + false + + diff --git a/nebula-logger/plugins/log-retention-rules/plugin/classes/LogRetentionRulesPlugin.cls b/nebula-logger/plugins/log-retention-rules/plugin/classes/LogRetentionRulesPlugin.cls index 45d7541b7..3e660e45f 100644 --- a/nebula-logger/plugins/log-retention-rules/plugin/classes/LogRetentionRulesPlugin.cls +++ b/nebula-logger/plugins/log-retention-rules/plugin/classes/LogRetentionRulesPlugin.cls @@ -4,12 +4,22 @@ // See LICENSE file or go to https://github.com/jongpie/NebulaLogger for full license details. // //-----------------------------------------------------------------------------------------------------------// -// TODO revise suppressed PMD rules/clean up code -@SuppressWarnings('PMD.ApexDoc, PMD.AvoidDebugStatements, PMD.DebugsShouldUseLoggingLevel, PMD.ExcessiveParameterList') +/** + * @group Plugins + * @description Optional plugin that adds the ability to create & deploy advanced, configurable rules + * for setting the retention date of `Log__c` records, using custom metadata types + * `LogRetentionRule__mdt` and `LogRetentionRuleCondition__mdt`. + */ public without sharing class LogRetentionRulesPlugin extends LoggerSObjectHandlerPlugin { private static final Map RULE_NAME_TO_RULE = new Map(); private static final Map> RULE_NAME_TO_CONDITIONS = new Map>(); + /** + * @description Handles converting Logger's buffer of `LogEntryEvent__e` records into `LogEntryArchive__b` records + * for any user with the included custom save method 'BIG_OBJECT' + * @param configuration The instance of `LoggerPlugin__mdt` configured for this specific plugin + * @param input The instance of `LoggerSObjectHandlerPlugin.SObjectHandlerInput`, provided by the logging system + */ public override void execute(LoggerPlugin__mdt configuration, LoggerSObjectHandler.SObjectHandlerInput input) { if (input.sobjectType != Schema.LogEntry__c.SObjectType) { return; @@ -67,6 +77,7 @@ public without sharing class LogRetentionRulesPlugin extends LoggerSObjectHandle } // Private methods + @SuppressWarnings('PMD.ApexCRUDViolation') private void loadConfiguredFilters() { Map queriedRulesByDeveloperName = new Map(); Map> queriedConditionsByRuleDeveloperName = new Map>(); diff --git a/nebula-logger/plugins/log-retention-rules/plugin/classes/LogRetentionRulesPlugin_Tests.cls b/nebula-logger/plugins/log-retention-rules/plugin/classes/LogRetentionRulesPlugin_Tests.cls index 2f1437819..440f9d630 100644 --- a/nebula-logger/plugins/log-retention-rules/plugin/classes/LogRetentionRulesPlugin_Tests.cls +++ b/nebula-logger/plugins/log-retention-rules/plugin/classes/LogRetentionRulesPlugin_Tests.cls @@ -127,7 +127,7 @@ private class LogRetentionRulesPlugin_Tests { IsLogEnabled__c = true, IsLogEntryEnabled__c = true, PluginApiName__c = LogRetentionRulesPlugin.class.getName(), - PluginType__c = 'Apex' + PluginType__c = 'SObject Handler - Apex' ); LoggerSObjectHandler.setMockPlugin(Schema.LogEntry__c.SObjectType, pluginConfiguration); } diff --git a/nebula-logger/plugins/log-retention-rules/plugin/customMetadata/LoggerPlugin.LogRetentionRules.md-meta.xml b/nebula-logger/plugins/log-retention-rules/plugin/customMetadata/LoggerPlugin.LogRetentionRules.md-meta.xml index b544399de..ac033e064 100644 --- a/nebula-logger/plugins/log-retention-rules/plugin/customMetadata/LoggerPlugin.LogRetentionRules.md-meta.xml +++ b/nebula-logger/plugins/log-retention-rules/plugin/customMetadata/LoggerPlugin.LogRetentionRules.md-meta.xml @@ -46,7 +46,7 @@ PluginType__c - Apex + SObject Handler - Apex VersionNumber__c diff --git a/nebula-logger/plugins/slack/plugin/slack/classes/SlackLoggerPlugin.cls b/nebula-logger/plugins/slack/plugin/slack/classes/SlackLoggerPlugin.cls index d00045b98..5682edcb5 100644 --- a/nebula-logger/plugins/slack/plugin/slack/classes/SlackLoggerPlugin.cls +++ b/nebula-logger/plugins/slack/plugin/slack/classes/SlackLoggerPlugin.cls @@ -9,8 +9,8 @@ */ @SuppressWarnings('PMD.ExcessivePublicCount') public without sharing class SlackLoggerPlugin extends LoggerSObjectHandlerPlugin implements Queueable, Database.AllowsCallouts { - private static String ENDPOINT = LoggerParameter.getString('SlackEndpoint', null); - private static LoggingLevel NOTIFICATION_LOGGING_LEVEL = Logger.getLoggingLevel(LoggerParameter.getString('SlackNotificationLoggingLevel', null)); + private static final String ENDPOINT = LoggerParameter.getString('SlackEndpoint', null); + private static final LoggingLevel NOTIFICATION_LOGGING_LEVEL = Logger.getLoggingLevel(LoggerParameter.getString('SlackNotificationLoggingLevel', null)); private List logs; @@ -27,7 +27,9 @@ public without sharing class SlackLoggerPlugin extends LoggerSObjectHandlerPlugi } /** - * @description Handles the queuable execute logic. + * @description Handles the integration with Slack. This method is automatically called by Nebula Logger's plugin framework. + * @param configuration The instance of `LoggerPlugin__mdt` configured for this specific plugin + * @param input The instance of `LoggerSObjectHandlerPlugin.SObjectHandlerInput`, provided by the logging system */ @SuppressWarnings('PMD.ExcessiveParameterList') public override void execute(LoggerPlugin__mdt configuration, LoggerSObjectHandler.SObjectHandlerInput input) { diff --git a/nebula-logger/plugins/slack/plugin/slack/classes/SlackLoggerPlugin_Tests.cls b/nebula-logger/plugins/slack/plugin/slack/classes/SlackLoggerPlugin_Tests.cls index 670ef2aa2..e5c41ef3e 100644 --- a/nebula-logger/plugins/slack/plugin/slack/classes/SlackLoggerPlugin_Tests.cls +++ b/nebula-logger/plugins/slack/plugin/slack/classes/SlackLoggerPlugin_Tests.cls @@ -11,7 +11,7 @@ private class SlackLoggerPlugin_Tests { /** * @description Inner class for handling mock HTTP callouts. */ - public class SuccessCalloutMock implements HttpCalloutMock { + private class SuccessCalloutMock implements HttpCalloutMock { /** * @description Returns the mock HTTP response. * @param request The HTTP request to "receive" @@ -47,7 +47,7 @@ private class SlackLoggerPlugin_Tests { LoggerPlugin__mdt slackPluginConfig = new LoggerPlugin__mdt( IsEnabled__c = true, PluginApiName__c = SlackLoggerPlugin.class.getName(), - PluginType__c = 'Apex' + PluginType__c = 'SObject Handler - Apex' ); LoggerSObjectHandler.setMockPlugin(Schema.Log__c.SObjectType, slackPluginConfig); diff --git a/nebula-logger/plugins/slack/plugin/slack/customMetadata/LoggerPlugin.Slack.md-meta.xml b/nebula-logger/plugins/slack/plugin/slack/customMetadata/LoggerPlugin.Slack.md-meta.xml index 3159f590d..0f41c9075 100644 --- a/nebula-logger/plugins/slack/plugin/slack/customMetadata/LoggerPlugin.Slack.md-meta.xml +++ b/nebula-logger/plugins/slack/plugin/slack/customMetadata/LoggerPlugin.Slack.md-meta.xml @@ -46,7 +46,7 @@ Any logs with MaxLogEntryLoggingLevelOrdinal__c >= the parameter 'SlackL PluginType__c - Apex + SObject Handler - Apex VersionNumber__c diff --git a/package.json b/package.json index f7a4196ff..b6285ce6a 100644 --- a/package.json +++ b/package.json @@ -54,6 +54,8 @@ "package:version:number:fix": "pwsh ./scripts/build/sync-package-version-number.ps1", "package:version:number:verify": "pwsh ./scripts/build/validate-current-package-version-number.ps1", "permset:assign:admin": "sfdx force:user:permset:assign --permsetname LoggerAdmin", + "permset:assign:big-object-admin": "sfdx force:user:permset:assign --permsetname LoggerLogEntryArchiveAdmin", + "plugin:version:create:big-object": "sfdx force:package:version:create --json --package \"Nebula Logger - Core Plugin - BigObject Archiving\" --codecoverage --installationkeybypass --wait 30", "plugin:version:create:log-retention-rules": "sfdx force:package:version:create --json --package \"Nebula Logger - Core Plugin - Log Retention Rules\" --codecoverage --installationkeybypass --wait 30", "plugin:version:create:logger-admin-dashboard": "sfdx force:package:version:create --json --package \"Nebula Logger - Core Plugin - Logger Admin Dashboard\" --codecoverage --installationkeybypass --wait 30", "plugin:version:create:slack": "sfdx force:package:version:create --json --package \"Nebula Logger - Core Plugin - Slack\" --codecoverage --installationkeybypass --wait 30", diff --git a/scripts/build/create-and-install-package-version.ps1 b/scripts/build/create-and-install-package-version.ps1 index e73d415d0..0583ae0b6 100644 --- a/scripts/build/create-and-install-package-version.ps1 +++ b/scripts/build/create-and-install-package-version.ps1 @@ -127,7 +127,7 @@ function Install-Package-Version { ) $packageVersionId = "$packageVersionId".Trim() - npx sfdx force:package:install --noprompt --targetusername $targetusername --wait 20 --package $packageVersionId + npx sfdx force:package:install --noprompt --targetusername $targetusername --wait 20 --publishwait 5 --package $packageVersionId if ($LASTEXITCODE -ne 0) { throw "Error installing package version ID: $packageVersionId" } diff --git a/scripts/build/create-managed-package-beta-version.ps1 b/scripts/build/create-managed-package-beta-version.ps1 index 99aed9829..73b67cc93 100644 --- a/scripts/build/create-managed-package-beta-version.ps1 +++ b/scripts/build/create-managed-package-beta-version.ps1 @@ -12,7 +12,7 @@ Copy-Item -Path $rootProject -Destination $unlockedProject -Force Write-Output "Overwriting $rootProject with $managedProject" Copy-Item -Path $managedProject -Destination $rootProject -Force -# Create a beta of the managed package version (no `--codecoverage` flag) +# Create a new version of the managed package cp -R ./nebula-logger/core/ ./nebula-logger/managed-package/ $gitBranch = (git branch --show-current) $gitCommit = (git rev-parse HEAD) diff --git a/scripts/build/generate-apex-docs.ps1 b/scripts/build/generate-apex-docs.ps1 index 9af21dfd0..31b73ba65 100644 --- a/scripts/build/generate-apex-docs.ps1 +++ b/scripts/build/generate-apex-docs.ps1 @@ -4,8 +4,9 @@ rm -rf ./docs/apex/configuration/ rm -rf ./docs/apex/logger-engine/ rm -rf ./docs/apex/log-management/ rm -rf ./docs/apex/plugin-framework/ +rm -rf ./docs/apex/plugins/ -npx apexdocs-generate --configPath ./config/docs/apexdocs.json --scope global public --sourceDir ./nebula-logger/core/main/ --targetDir ./docs/apex --targetGenerator jekyll +npx apexdocs-generate --configPath ./config/docs/apexdocs.json --scope global public --sourceDir ./nebula-logger/core/main/ ./nebula-logger/plugins/ --targetDir ./docs/apex --targetGenerator jekyll # Make a few adjustments to the generated markdown files so that they work correctly in Github Pages $indexPageFile = "docs/apex/index.md" @@ -16,6 +17,7 @@ Write-Output "Processing file: $indexPageFile" (Get-Content -path $indexPageFile -Raw) -replace "/Logger-Engine/","logger-engine/" | Set-Content -Path $indexPageFile -NoNewline (Get-Content -path $indexPageFile -Raw) -replace "/Log-Management/","log-management/" | Set-Content -Path $indexPageFile -NoNewline (Get-Content -path $indexPageFile -Raw) -replace "/Plugin-Framework/","plugin-framework/" | Set-Content -Path $indexPageFile -NoNewline +(Get-Content -path $indexPageFile -Raw) -replace "/Plugins/","plugins/" | Set-Content -Path $indexPageFile -NoNewline $docsSubdirectories = "docs/apex/*/*.*" foreach($file in Get-ChildItem $docsSubdirectories) { diff --git a/scripts/data/create-sample-log-entry-archives.apex b/scripts/data/create-sample-log-entry-archives.apex new file mode 100644 index 000000000..48b17681f --- /dev/null +++ b/scripts/data/create-sample-log-entry-archives.apex @@ -0,0 +1,15 @@ +Logger.getUserSettings().DefaultSaveMethod__c = 'BIG_OBJECT'; +//Logger.getUserSettings().IsAnonymousModeEnabled__c = true; + +for (Integer i = 0; i < 10; i++) { + Logger.info('hello, LogEntryArchive__b! entry index==' + i).addTag('test tag'); +} + +try { + Logger.debug('about to cause an exception').addTag('error logging'); + update new User(); +} catch(Exception ex) { + Logger.error('got that exception that everyone was talking about, wild stuff', ex).addTag('error logging'); + Logger.saveLog(); + throw ex; +} diff --git a/scripts/data/query-log-entry-archive-big-object.apex b/scripts/data/query-log-entry-archive-big-object.apex new file mode 100644 index 000000000..b0700f0d3 --- /dev/null +++ b/scripts/data/query-log-entry-archive-big-object.apex @@ -0,0 +1,15 @@ +Id userId = UserInfo.getUserId(); +List loggingLevelNames = new List(); +for (LoggingLevel logLevel : LoggingLevel.values()) { + loggingLevelNames.add(logLevel.name()); +} + +List archives = [ + SELECT Timestamp__c, LoggedBy__c, LoggingLevel__c, TransactionId__c, TransactionEntryNumber__c, Message__c, Tags__c + FROM LogEntryArchive__b + WHERE LoggedBy__c = :userId + AND LoggingLevel__c IN :loggingLevelNames + AND Timestamp__c >= LAST_WEEK + ORDER BY LoggedBy__c, LoggingLevel__c, Timestamp__c DESC +]; +System.debug('Matching LogEntryArchive__b records:\n' + JSON.serializePretty(archives)); \ No newline at end of file diff --git a/sfdx-project.json b/sfdx-project.json index 0fe2c812c..de7cb176f 100644 --- a/sfdx-project.json +++ b/sfdx-project.json @@ -107,6 +107,7 @@ "Nebula Logger - Core@4.7.1-5": "04t5Y0000015lXwQAI", "Nebula Logger - Core@4.7.1-6": "04t5Y0000015lY1QAI", "Nebula Logger - Core@4.7.1-7": "04t5Y0000015lY6QAI", + "Nebula Logger - Core@4.7.1-NEXT-plugin-framework-&-trigger-handler-enhancements": "04t5Y0000015lYaQAI", "Nebula Logger - Plugin - BigObject Archiving": "0Ho5Y000000blMSSAY", "Nebula Logger - Plugin - Log Retention Rules": "0Ho5Y000000blNfSAI", "Nebula Logger - Plugin - Logger Admin Dashboard": "0Ho5Y000000blNkSAI",