Skip to content

Commit

Permalink
Improved fully qualified references to code in the Schema and System …
Browse files Browse the repository at this point in the history
…namespaces (#712)

* Moved the existing name-shadowing classes in the extra-tests directory to be in separate subdirectories (one for each namespace, Schema and System)
    - There's just so many of them now!

* Added name-shadowing classes for several standard classes in the Schema and System namespaces & switched to using fully-qualified references for these classes:
    - Schema.ApexClass
    - Schema.ApexEmailNotification
    - Schema.ApexTrigger
    - Schema.AsyncApexJob
    - Schema.BatchApexErrorEvent
    - Schema.CustomPermission
    - Schema.DisplayType
    - Schema.FlowDefinitionView
    - Schema.FlowExecutionErrorEvent
    - Schema.FlowVersionView
    - Schema.PermissionSet
    - Schema.PermissionSetAssignment
    - Schema.SoapType
    - Schema.UserRecordAccess
    - Schema.UserRole
    - System.BatchableContext
    - System.Comparable
    - System.Database
    - System.EventBus
    - System.FinalizerContext
    - System.InstallHandler
    - System.JSON
    - System.Matcher
    - System.Pattern
    - System.PicklistEntry
    - System.Queueable
    - System.QueueableContext
    - System.Quiddity
    - System.Request
    - System.RestContext
    - System.RestRequest
    - System.RestResponse
    - System.Schedulable
    - System.SchedulableContext
    - System.Search
    - System.TriggerOperation
    - System.UUID

* Scope creep: fixed some flaky tests in LogBatchPurgeController_Tests
  • Loading branch information
jongpie authored Jul 11, 2024
1 parent c586ce1 commit 48ea5fe
Show file tree
Hide file tree
Showing 232 changed files with 1,583 additions and 903 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@

The most robust logger for Salesforce. Works with Apex, Lightning Components, Flow, Process Builder & Integrations. Designed for Salesforce admins, developers & architects.

## Unlocked Package - v4.13.12
## Unlocked Package - v4.13.13

[![Install Unlocked Package in a Sandbox](./images/btn-install-unlocked-package-sandbox.png)](https://test.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000015oCkQAI)
[![Install Unlocked Package in Production](./images/btn-install-unlocked-package-production.png)](https://login.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000015oCkQAI)
[![Install Unlocked Package in a Sandbox](./images/btn-install-unlocked-package-sandbox.png)](https://test.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000015oDsQAI)
[![Install Unlocked Package in Production](./images/btn-install-unlocked-package-production.png)](https://login.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000015oDsQAI)
[![View Documentation](./images/btn-view-documentation.png)](https://jongpie.github.io/NebulaLogger/)

`sf package install --wait 20 --security-type AdminsOnly --package 04t5Y0000015oCkQAI`
`sf package install --wait 20 --security-type AdminsOnly --package 04t5Y0000015oDsQAI`

`sfdx force:package:install --wait 20 --securitytype AdminsOnly --package 04t5Y0000015oCkQAI`
`sfdx force:package:install --wait 20 --securitytype AdminsOnly --package 04t5Y0000015oDsQAI`

---

Expand Down
10 changes: 7 additions & 3 deletions docs/apex/Configuration/LoggerParameter.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ The name of the Platform Cache partition to use for caching (when platform cache

#### `QUERY_APEX_CLASS_DATA``Boolean`

Controls if Nebula Logger queries `ApexClass` data. When set to `false`, any `ApexClass` fields on `LogEntryEvent__e` and `Log__c` will not be populated Controlled by the custom metadata record `LoggerParameter.QueryApexClassData`, or `true` as the default
Controls if Nebula Logger queries `Schema.ApexClass` data. When set to `false`, any `Schema.ApexClass` fields on `LogEntryEvent__e` and `Log__c` will not be populated Controlled by the custom metadata record `LoggerParameter.QueryApexClassData`, or `true` as the default

#### `QUERY_APEX_TRIGGER_DATA``Boolean`

Controls if Nebula Logger queries `ApexTrigger` data. When set to `false`, any `ApexTrigger` fields on `LogEntryEvent__e` and `Log__c` will not be populated Controlled by the custom metadata record `LoggerParameter.QueryApexTriggerData`, or `true` as the default
Controls if Nebula Logger queries `Schema.ApexTrigger` data. When set to `false`, any `Schema.ApexTrigger` fields on `LogEntryEvent__e` and `Log__c` will not be populated Controlled by the custom metadata record `LoggerParameter.QueryApexTriggerData`, or `true` as the default

#### `QUERY_AUTH_SESSION_DATA``Boolean`

Expand All @@ -64,7 +64,7 @@ Controls if Nebula Logger queries `Schema.AuthSession` data synchronously &

#### `QUERY_FLOW_DEFINITION_VIEW_DATA``Boolean`

Controls if Nebula Logger queries `FlowDefinitionView` data. When set to `false`, any `FlowDefinitionView` fields on `LogEntryEvent__e` and `Log__c` will not be populated Controlled by the custom metadata record `LoggerParameter.QueryFlowDefinitionViewData`, or `true` as the default
Controls if Nebula Logger queries `Schema.FlowDefinitionView` data. When set to `false`, any `Schema.FlowDefinitionView` fields on `LogEntryEvent__e` and `Log__c` will not be populated Controlled by the custom metadata record `LoggerParameter.QueryFlowDefinitionViewData`, or `true` as the default

#### `QUERY_NETWORK_DATA``Boolean`

Expand Down Expand Up @@ -102,6 +102,10 @@ Indicates if Nebula Logger will enforce scenario-based logging to be used. When

Indicates if Nebula Logger will send an error email notification if any internal exceptions occur. Controlled by the custom metadata record `LoggerParameter.SendErrorEmailNotifications`, or `true` as the default

#### `STORE_HEAP_SIZE_LIMIT``Boolean`

Indicates if Nebula Logger will store the transaction heap limits on `LogEntry__c`, retrieved from the class `System.Limits`. Controlled by the custom metadata record `LoggerParameter.StoreApexHeapSizeLimit`, or `true` as the default. Relies on `LoggerParameter.StoreTransactionLimits` to be true, as well.

#### `STORE_HTTP_RESPONSE_HEADER_VALUES``Boolean`

Indicates if Nebula Logger will store the header values when logging an instance of `System.HttpResponse`. Controlled by the custom metadata record `LoggerParameter.StoreHttpResponseHeaderValues`, or `true` as the default. Regardless of how this parameter is configured, Nebula Logger will still log the header keys of any instance of `System.HttpResponse` that is logged - this parameter only controls if the header values are stored.
Expand Down
6 changes: 3 additions & 3 deletions docs/apex/Configuration/LoggerTriggerableContext.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ Class used by the logging system for trigger contextual details

### Constructors

#### `LoggerTriggerableContext(Schema.SObjectType sobjectType, TriggerOperation triggerOperationType, List<SObject> triggerNew)`
#### `LoggerTriggerableContext(Schema.SObjectType sobjectType, System.TriggerOperation triggerOperationType, List<SObject> triggerNew)`

#### `LoggerTriggerableContext(Schema.SObjectType sobjectType,TriggerOperation triggerOperationType,List<SObject> triggerNew,Map<Id, SObject> triggerNewMap,Map<Id, SObject> triggerOldMap)`
#### `LoggerTriggerableContext(Schema.SObjectType sobjectType,System.TriggerOperation triggerOperationType,List<SObject> triggerNew,Map<Id, SObject> triggerNewMap,Map<Id, SObject> triggerOldMap)`

---

Expand All @@ -34,7 +34,7 @@ Class used by the logging system for trigger contextual details

#### `triggerOldMap``Map<Id, SObject>`

#### `triggerOperationType``TriggerOperation`
#### `triggerOperationType``System.TriggerOperation`

#### `triggerOperationTypeName``String`

Expand Down
10 changes: 5 additions & 5 deletions docs/apex/Log-Management/LogBatchPurgeController.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,19 @@ Boolean

true if the current user has delete permission on the Log\_\_c object.

#### `getBatchPurgeJobRecords()``List<AsyncApexJob>`
#### `getBatchPurgeJobRecords()``List<Schema.AsyncApexJob>`

Returns `List&lt;AsyncApexJob&gt;` to display logBatchPurger jobs details in a Datatable.
Returns `List&lt;Schema.AsyncApexJob&gt;` to display logBatchPurger jobs details in a Datatable.

##### Return

**Type**

List&lt;AsyncApexJob&gt;
List&lt;Schema.AsyncApexJob&gt;

**Description**

The instance of `List&lt;AsyncApexJob&gt;`, containing list of logBatchPurge jobs.
The instance of `List&lt;Schema.AsyncApexJob&gt;`, containing list of logBatchPurge jobs.

#### `getMetrics(String dateFilterOption)``Map<String, Object>`

Expand Down Expand Up @@ -84,7 +84,7 @@ String

**Description**

Returns the ID of the AsyncApexJob object associated with the LogBatchPurger job as a string
Returns the ID of the Schema.AsyncApexJob object associated with the LogBatchPurger job as a string

---

Expand Down
60 changes: 30 additions & 30 deletions docs/apex/Log-Management/LogManagementDataSelector.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ List&lt;SObject&gt;

`List&lt;SObject&gt;` containing any records in the specified `SObjectType`

#### `getApexClasses(Set<String> apexClassNames)``List<ApexClass>`
#### `getApexClasses(Set<String> apexClassNames)``List<Schema.ApexClass>`

Returns a list of `ApexClass` records
Returns a list of `Schema.ApexClass` records

##### Parameters

Expand All @@ -45,15 +45,15 @@ Returns a list of `ApexClass` records

**Type**

List&lt;ApexClass&gt;
List&lt;Schema.ApexClass&gt;

**Description**

`List&lt;ApexClass&gt;` containing any matching records
`List&lt;Schema.ApexClass&gt;` containing any matching records

#### `getApexTriggers(Set<String> apexTriggerNames)``List<ApexTrigger>`
#### `getApexTriggers(Set<String> apexTriggerNames)``List<Schema.ApexTrigger>`

Returns a list of `ApexTrigger` records
Returns a list of `Schema.ApexTrigger` records

##### Parameters

Expand All @@ -65,11 +65,11 @@ Returns a list of `ApexTrigger` records

**Type**

List&lt;ApexTrigger&gt;
List&lt;Schema.ApexTrigger&gt;

**Description**

`List&lt;ApexTrigger&gt;` containing any matching records
`List&lt;Schema.ApexTrigger&gt;` containing any matching records

#### `getById(Schema.SObjectType sobjectType, Set<String> fieldNames, List<Id> recordIds)``List<SObject>`

Expand All @@ -93,19 +93,19 @@ List&lt;SObject&gt;

`List&lt;SObject&gt;` containing any matching records in the specified `SObjectType`

#### `getCachedApexEmailNotifications()``List<ApexEmailNotification>`
#### `getCachedApexEmailNotifications()``List<Schema.ApexEmailNotification>`

Returns a cached copy of the `ApexEmailNotification` records in the org
Returns a cached copy of the `Schema.ApexEmailNotification` records in the org

##### Return

**Type**

List&lt;ApexEmailNotification&gt;
List&lt;Schema.ApexEmailNotification&gt;

**Description**

The cached `List&lt;ApexEmailNotification&gt;` records
The cached `List&lt;Schema.ApexEmailNotification&gt;` records

#### `getCachedRecentLogWithApiReleaseDetails()``Log__c`

Expand All @@ -123,15 +123,15 @@ The cached `Log__c` record, or `null` if no match is found

#### `getCountOfAsyncApexJobs(String apexClassName, String apexMethodName, List<String> jobStatuses)``Integer`

Returns the count of `AsyncApexJob` records with the specified Apex class name, method name &amp; job status
Returns the count of `Schema.AsyncApexJob` records with the specified Apex class name, method name &amp; job status

##### Parameters

| Param | Description |
| ---------------- | --------------------------------------------------------------------------------- |
| `apexClassName` | The fully-qualified name of the Apex class associated with `AsyncApexJob` |
| `apexMethodName` | The specific method (if any) within the Apex class associated with `AsyncApexJob` |
| `jobStatuses` | The list of job statuses that should be used to filter `AsynxApexJob` records |
| Param | Description |
| ---------------- | ---------------------------------------------------------------------------------------- |
| `apexClassName` | The fully-qualified name of the Apex class associated with `Schema.AsyncApexJob` |
| `apexMethodName` | The specific method (if any) within the Apex class associated with `Schema.AsyncApexJob` |
| `jobStatuses` | The list of job statuses that should be used to filter `AsynxApexJob` records |

##### Return

Expand Down Expand Up @@ -163,9 +163,9 @@ Integer

The `Integer` count of matching `LogEntry__c` records

#### `getDeleteableUserRecordAccess(List<Id> recordIds)``List<UserRecordAccess>`
#### `getDeleteableUserRecordAccess(List<Id> recordIds)``List<Schema.UserRecordAccess>`

Returns the list of `UserRecordAccess` records for any of the specified record IDs that the current user can delete
Returns the list of `Schema.UserRecordAccess` records for any of the specified record IDs that the current user can delete

##### Parameters

Expand All @@ -177,15 +177,15 @@ Returns the list of `UserRecordAccess` records for any of the specified record I

**Type**

List&lt;UserRecordAccess&gt;
List&lt;Schema.UserRecordAccess&gt;

**Description**

The matching `List&lt;UserRecordAccess&gt;` records
The matching `List&lt;Schema.UserRecordAccess&gt;` records

#### `getFlowDefinitionViewsByFlowApiName(List<String> flowApiNames)``List<FlowDefinitionView>`
#### `getFlowDefinitionViewsByFlowApiName(List<String> flowApiNames)``List<Schema.FlowDefinitionView>`

Returns a list of `FlowDefinitionView` records
Returns a list of `Schema.FlowDefinitionView` records

##### Parameters

Expand All @@ -197,15 +197,15 @@ Returns a list of `FlowDefinitionView` records

**Type**

List&lt;FlowDefinitionView&gt;
List&lt;Schema.FlowDefinitionView&gt;

**Description**

`List&lt;FlowDefinitionView&gt;` containing any matching records
`List&lt;Schema.FlowDefinitionView&gt;` containing any matching records

#### `getFlowVersionViewsByDurableId(List<String> durableIds)``List<FlowVersionView>`
#### `getFlowVersionViewsByDurableId(List<String> durableIds)``List<Schema.FlowVersionView>`

Returns a list of `FlowVersionView` records description
Returns a list of `Schema.FlowVersionView` records description

##### Parameters

Expand All @@ -217,11 +217,11 @@ Returns a list of `FlowVersionView` records description

**Type**

List&lt;FlowVersionView&gt;
List&lt;Schema.FlowVersionView&gt;

**Description**

`List&lt;FlowDefinitionView&gt;` containing any matching records
`List&lt;Schema.FlowDefinitionView&gt;` containing any matching records

#### `getInstance()``LogManagementDataSelector`

Expand Down
2 changes: 1 addition & 1 deletion docs/apex/Log-Management/LoggerSettingsController.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ Inner class used for sorting LoggerSettings\_\_c, used for 3 reasons: 1. Trying

###### `compareTo(Object compareTo)``Integer`

Implements sorting logic for the `Comparable` interface
Implements sorting logic for the `System.Comparable` interface

####### Parameters

Expand Down
Loading

0 comments on commit 48ea5fe

Please sign in to comment.