Skip to content

Commit

Permalink
Added new LoggerSettings__c fields StartTime__c and EndTime__c (#495)
Browse files Browse the repository at this point in the history
* Added new LoggerSettings__c fields StartTime__c and EndTime__c to prove the ability to schedule & expire settings records

* Incorporated new fields StartTime__c and EndTime__c into loggerSettings lwc

* Also cleaned up some legacy code used for displaying the fields in the 'General Settings' section of the loggerSettings lwc - all fields are now controlled by loggerSettingsPageLayout.js

* Fixed some ESLint violations

* Updated pwsh script to automatically updated the package version ID for the unlocked package's sfdx install command in README.md
  • Loading branch information
jongpie authored May 24, 2023
1 parent 695887d commit 0ba55c3
Show file tree
Hide file tree
Showing 18 changed files with 466 additions and 251 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@

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

## Unlocked Package - v4.10.2
## Unlocked Package - v4.10.3

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

`sfdx package install --wait 20 --security-type AdminsOnly --package 04t5Y0000023S8jQAE`
`sfdx package install --wait 20 --security-type AdminsOnly --package 04t5Y0000023SAfQAM`

## Managed Package - v4.10.0

[![Install Managed Package in a Sandbox](./images/btn-install-managed-package-sandbox.png)](https://test.salesforce.com/packaging/installPackage.apexp?mgd=true&p0=04t5Y0000015nWeQAI)
[![Install Managed Package in Production](./images/btn-install-managed-package-production.png)](https://login.salesforce.com/packaging/installPackage.apexp?mgd=true&p0=04t5Y0000015nWeQAI)
[![View Milestone](./images/btn-view-managed-package-milestone.png)](https://github.com/jongpie/NebulaLogger/milestone/10?closed=1)

`sfdx package install --wait 20 --security-type AdminsOnly --package 04t5Y0000015nWeQAI`
`sfdx package install --wait 30 --security-type AdminsOnly --package 04t5Y0000015nWeQAI`

---

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8" ?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>EndTime__c</fullName>
<externalId>false</externalId>
<inlineHelpText>Optional - when set, the LoggerSettings__c record is only used when EndTime__c &gt;= System.now()</inlineHelpText>
<label>End Time</label>
<required>false</required>
<type>DateTime</type>
</CustomField>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>StartTime__c</fullName>
<externalId>false</externalId>
<inlineHelpText>Optional - when set, the LoggerSettings__c record is only used when StartTime__c &lt;= System.now()</inlineHelpText>
<label>Start Time</label>
<required>false</required>
<trackTrending>false</trackTrending>
<type>DateTime</type>
</CustomField>
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,20 @@
},
"DefaultLogOwner__c": null,
"DefaultLogPurgeAction__c": "Delete",
"DefaultPlatformEventStorageLocation__c": "CUSTOM_OBJECTS",
"DefaultPlatformEventStorageLoggingLevel__c": null,
"DefaultScenario__c": null,
"DefaultLogShareAccessLevel__c": "Read",
"DefaultNumberOfDaysToRetainLogs__c": 14,
"DefaultPlatformEventStorageLocation__c": "CUSTOM_OBJECTS",
"DefaultPlatformEventStorageLoggingLevel__c": null,
"DefaultSaveMethod__c": "EVENT_BUS",
"DefaultScenario__c": null,
"EndTime__c": null,
"IsAnonymousModeEnabled__c": false,
"IsApexSystemDebugLoggingEnabled__c": true,
"IsDataMaskingEnabled__c": true,
"IsEnabled__c": true,
"IsJavaScriptConsoleLoggingEnabled__c": true,
"IsRecordFieldStrippingEnabled__c": false,
"IsSavingEnabled__c": true,
"LoggingLevel__c": "DEBUG"
"LoggingLevel__c": "DEBUG",
"StartTime__c": null
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"DefaultPlatformEventStorageLoggingLevel__c": null,
"DefaultSaveMethod__c": "EVENT_BUS",
"DefaultScenario__c": null,
"EndTime__c": null,
"Id": "a031g000003WHwzAAG",
"IsAnonymousModeEnabled__c": false,
"IsApexSystemDebugLoggingEnabled__c": true,
Expand All @@ -28,6 +29,7 @@
"LastModifiedDate": "2021-12-02T05:35:37.000+0000",
"LoggingLevel__c": "INFO",
"SetupOwnerId": "00D1g000000HgecEAC",
"StartTime__c": null,
"CreatedBy": {
"attributes": {
"type": "User",
Expand Down Expand Up @@ -75,6 +77,7 @@
"DefaultPlatformEventStorageLoggingLevel__c": null,
"DefaultSaveMethod__c": "EVENT_BUS",
"DefaultScenario__c": null,
"EndTime__c": null,
"Id": "a031g000003WFMiAAO",
"IsAnonymousModeEnabled__c": false,
"IsApexSystemDebugLoggingEnabled__c": true,
Expand All @@ -86,6 +89,7 @@
"LastModifiedDate": "2021-12-02T05:00:18.000+0000",
"LoggingLevel__c": "DEBUG",
"SetupOwnerId": "00e1g000000ySdaAAE",
"StartTime__c": null,
"CreatedBy": {
"attributes": {
"type": "User",
Expand Down Expand Up @@ -133,6 +137,7 @@
"DefaultPlatformEventStorageLoggingLevel__c": null,
"DefaultSaveMethod__c": "EVENT_BUS",
"DefaultScenario__c": null,
"EndTime__c": null,
"Id": "a031g000003WHvQAAW",
"IsAnonymousModeEnabled__c": false,
"IsApexSystemDebugLoggingEnabled__c": true,
Expand All @@ -144,6 +149,7 @@
"LastModifiedDate": "2021-12-02T05:35:02.000+0000",
"LoggingLevel__c": "INFO",
"SetupOwnerId": "00e1g000000ySdXAAU",
"StartTime__c": null,
"CreatedBy": {
"attributes": {
"type": "User",
Expand Down Expand Up @@ -191,6 +197,7 @@
"DefaultPlatformEventStorageLoggingLevel__c": null,
"DefaultSaveMethod__c": "EVENT_BUS",
"DefaultScenario__c": null,
"EndTime__c": null,
"Id": "a031g000003WFMOAA4",
"IsAnonymousModeEnabled__c": false,
"IsApexSystemDebugLoggingEnabled__c": true,
Expand All @@ -202,6 +209,7 @@
"LastModifiedDate": "2021-11-30T05:22:42.000+0000",
"LoggingLevel__c": "FINER",
"SetupOwnerId": "0051g000007o2bTAAQ",
"StartTime__c": null,
"CreatedBy": {
"attributes": {
"type": "User",
Expand Down Expand Up @@ -249,6 +257,7 @@
"DefaultPlatformEventStorageLoggingLevel__c": null,
"DefaultSaveMethod__c": "EVENT_BUS",
"DefaultScenario__c": null,
"EndTime__c": null,
"Id": "a031g000003WFMYAA4",
"IsAnonymousModeEnabled__c": false,
"IsApexSystemDebugLoggingEnabled__c": true,
Expand All @@ -260,6 +269,7 @@
"LastModifiedDate": "2021-11-30T04:59:57.000+0000",
"LoggingLevel__c": "DEBUG",
"SetupOwnerId": "0051g000007o2baAAA",
"StartTime__c": null,
"CreatedBy": {
"attributes": {
"type": "User",
Expand Down Expand Up @@ -307,6 +317,7 @@
"DefaultPlatformEventStorageLoggingLevel__c": null,
"DefaultSaveMethod__c": "EVENT_BUS",
"DefaultScenario__c": null,
"EndTime__c": null,
"Id": "a031g000003WHvVAAW",
"IsAnonymousModeEnabled__c": false,
"IsApexSystemDebugLoggingEnabled__c": true,
Expand All @@ -318,6 +329,7 @@
"LastModifiedDate": "2021-11-30T22:36:40.000+0000",
"LoggingLevel__c": "DEBUG",
"SetupOwnerId": "0051g000007o2bcAAA",
"StartTime__c": null,
"CreatedBy": {
"attributes": {
"type": "User",
Expand Down Expand Up @@ -365,6 +377,7 @@
"DefaultPlatformEventStorageLoggingLevel__c": null,
"DefaultSaveMethod__c": "EVENT_BUS",
"DefaultScenario__c": null,
"EndTime__c": null,
"Id": "a031g000003WFORAA4",
"IsAnonymousModeEnabled__c": false,
"IsApexSystemDebugLoggingEnabled__c": true,
Expand All @@ -376,6 +389,7 @@
"LastModifiedDate": "2021-11-30T06:16:01.000+0000",
"LoggingLevel__c": "DEBUG",
"SetupOwnerId": "0051g000007o2bZAAQ",
"StartTime__c": null,
"CreatedBy": {
"attributes": {
"type": "User",
Expand Down Expand Up @@ -423,6 +437,7 @@
"DefaultPlatformEventStorageLoggingLevel__c": null,
"DefaultSaveMethod__c": "EVENT_BUS",
"DefaultScenario__c": null,
"EndTime__c": null,
"Id": "a031g000003WFMJAA4",
"IsAnonymousModeEnabled__c": false,
"IsApexSystemDebugLoggingEnabled__c": true,
Expand All @@ -434,6 +449,7 @@
"LastModifiedDate": "2021-12-02T05:09:48.000+0000",
"LoggingLevel__c": "DEBUG",
"SetupOwnerId": "0051g000007oJ8cAAE",
"StartTime__c": null,
"CreatedBy": {
"attributes": {
"type": "User",
Expand Down Expand Up @@ -481,6 +497,7 @@
"DefaultPlatformEventStorageLoggingLevel__c": null,
"DefaultSaveMethod__c": "EVENT_BUS",
"DefaultScenario__c": null,
"EndTime__c": null,
"Id": "a031g000003WFMnAAO",
"IsAnonymousModeEnabled__c": false,
"IsApexSystemDebugLoggingEnabled__c": true,
Expand All @@ -492,6 +509,7 @@
"LastModifiedDate": "2021-11-30T05:22:31.000+0000",
"LoggingLevel__c": "WARN",
"SetupOwnerId": "0051g000007o2bNAAQ",
"StartTime__c": null,
"CreatedBy": {
"attributes": {
"type": "User",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,20 @@
"localApiName": "DefaultSaveMethod__c",
"type": "String"
},
"DefaultScenario__c": {
"apiName": "DefaultScenario__c",
"inlineHelpText": "Sets a default scenario for the transaction",
"label": "Log Scenario",
"localApiName": "DefaultScenario__c",
"type": "String"
},
"EndTime__c": {
"apiName": "EndTime__c",
"inlineHelpText": "TODO",
"label": "End Time",
"localApiName": "EndTime__c",
"type": "Datetime"
},
"IsAnonymousModeEnabled__c": {
"apiName": "IsAnonymousModeEnabled__c",
"inlineHelpText": "When enabled, any logs generated will not have any user-specific details set - any fields related to the User, Profile, etc. will be null. Note: this feature only works properly when using the save method EVENT_BUS.",
Expand Down Expand Up @@ -145,12 +159,12 @@
"localApiName": "LoggingLevel__c",
"type": "String"
},
"DefaultScenario__c": {
"apiName": "DefaultScenario__c",
"inlineHelpText": "Sets a default scenario for the transaction",
"label": "Log Scenario",
"localApiName": "DefaultScenario__c",
"type": "String"
"StartTime__c": {
"apiName": "StartTime__c",
"inlineHelpText": "TODO",
"label": "Start Time",
"localApiName": "StartTime__c",
"type": "Datetime"
}
},
"label": "Logger Settings",
Expand Down
Loading

0 comments on commit 0ba55c3

Please sign in to comment.