Skip to content

Commit

Permalink
Summer '22 release - v4.8.0 (#343)
Browse files Browse the repository at this point in the history
* Closed #335 Added new method Logger.ignoreOrigin() to ignore specified Apex types when parsing each log entry's stack trace

* Fixed #339 by removing some old metadata references in Admin.profile

* Fixed #340 by adding some extra checks for empty lists in builder's methods stripInnaccessible() and getJson()

* Changed some guard clauses to LogEntryEventBuilder to check for null instead of an empty list

* Fixed a test that failed in the managed package due to a namespace prefix being present

* Fixed a null object exception that could occur when the message template is null (something I noticed when discussing #342)

* Fixed #346 by updating test stack traces for Aura & LWC to reflect the latest content + updating the logic used for parsing the component's stack trace

* Fixed test failures that would occur in LogBatchPurgeController_Tests when both the unlocked package & managed packages are installed in an org

* Fixed #352 by updating some tests in LogEntryEventBuilder_Tests to not run when running with a namespace prefix

* Added some additional tests for stacktrace parsing, added some FIXMEs to work on in a future release related to namespace prefixes

* Fixed an issue where anonymous mode (controlled via LoggerSettings__c.IsAnonymousModeEnabled__c) would still assign the log to the logging user, resulting in the Log__c not being fully anonymous

* Fixed #345 by switching to using upserts (instead of inserts) for LogEntry__c and LogEntryTag__c records

* Fixed #331 by correcting links in README for the docs site, reverted some changes in README.md, extended timeout for managed package version creation

* Fixed CMDT configuration file for data classification app

* Bumped all metadata to API version v55.0 (Summer '22 release)

* Refreshed sample Experience Cloud site metadata to reflect changes in API v55.0

* Regenerated package-lock.json

* Added sfdx's new folder 'sf' to .gitignore and .prettierignore
  • Loading branch information
jongpie authored Aug 24, 2022
1 parent 70102bd commit 3f20f6f
Show file tree
Hide file tree
Showing 185 changed files with 12,989 additions and 38,673 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Folders to exclude
.localdevserver/
.settings/
.sf/
.sfdx/
.vscode/
nebula-logger/**/main/default/
Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# Folders to exclude
.localdevserver/
.settings/
.sf/
.sfdx/
.vscode/
scripts/
Expand Down
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@

Designed for Salesforce admins, developers & architects. A robust logger for Apex, Lightning Components, Flow, Process Builder & Integrations.

## Unlocked Package - v4.7.8
## Unlocked Package - v4.8.0

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

## Managed Package - v4.7.0
## Managed Package - v4.8.0

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

---

Expand Down Expand Up @@ -316,7 +316,7 @@ Each of the logging methods in `Logger` (such as `Logger.error()`, `Logger.debug
- Log a message and a save result - `Logger.error(String message, Database.SaveResult saveResult)`
- ...

To see the full list of overloads, check out the `Logger` class [documentation](https://jongpie.github.io/NebulaLogger/logger-engine/Logger).
To see the full list of overloads, check out the `Logger` class [documentation](https://jongpie.github.io/NebulaLogger/apex/Logger-Engine/Logger).

### Using the Fluent Interface

Expand Down Expand Up @@ -365,7 +365,7 @@ The class `LogMessage` provides the ability to generate string messages on deman
System.assertEquals(expectedMessage, formattedMessage);
```

For more details, check out the `LogMessage` class [documentation](https://jongpie.github.io/NebulaLogger/logger-engine/LogMessage).
For more details, check out the `LogMessage` class [documentation](https://jongpie.github.io/NebulaLogger/apex/Logger-Engine/LogMessage).

---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@
"ColumnSpacerSizeMobile": "0.75rem",
"ComponentSpacerSizeDesktop": "1.5rem",
"ComponentSpacerSizeMobile": "1.5rem",
"DropdownBackgroundColor": "var(--dxp-g-root)",
"DropdownBackgroundHoverColor": "var(--dxp-g-neutral)",
"DropdownBorderColor": "var(--dxp-g-neutral)",
"DropdownTextColor": "var(--dxp-g-root-contrast)",
"DropdownTextHoverColor": "var(--dxp-g-neutral-contrast)",
"FormElementBackgroundColor": "var(--dxp-g-root)",
"FormElementBorderColor": "var(--dxp-g-neutral-1)",
"FormElementBorderRadius": "4px",
Expand Down Expand Up @@ -97,6 +102,7 @@
"LinkTextDecorationHover": "underline",
"MaxContentWidthDesktop": "1800px",
"MaxContentWidthMobile": "none",
"MobileBaseFontSize": "1rem",
"PrimaryAccentColor": "#005fb2",
"PrimaryAccentForegroundColor": "#ffffff",
"SiteLogo": "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"favIconAssetRef": null,
"headMarkup": "<meta charset=\"UTF-8\" />\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n<title>Welcome to LWC Communities!</title>\n\n<link rel=\"stylesheet\" href=\"{ basePath }/assets/styles/styles.css?{ versionKey }\" />\n\n\n<!-- webruntime-branding-shared stylesheets -->\n<link rel=\"stylesheet\" href=\"{ basePath }/assets/styles/salesforce-lightning-design-system.min.css?{ versionKey }\" />\n<link rel=\"stylesheet\" href=\"{ basePath }/assets/styles/dxp-site-spacing-styling-hooks.min.css?{ versionKey }\" /><link rel=\"stylesheet\" href=\"{ basePath }/assets/styles/dxp-styling-hooks.min.css?{ versionKey }\" />\n<link rel=\"stylesheet\" href=\"{ basePath }/assets/styles/dxp-slds-extensions.min.css?{ versionKey }\" />\n\n\n<!-- webruntime-branding-shared stylesheets -->",
"id": "3772c2ec-1566-4ffa-9231-d5db8d42b47d",
"isLockerServiceEnabled": true,
"isRelaxedCSPLevel": false,
"label": "main",
"templateName": "talon-template-byo",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"activeViewId": "e02c0193-8cb2-41b6-8298-f31c4f3a3f3f",
"appPageId": "3772c2ec-1566-4ffa-9231-d5db8d42b47d",
"configurationTags": ["allow-in-static-site", "too-many-requests"],
"id": "58bd1d16-3a54-4cf5-84a9-16a870bce9d2",
"label": "Too Many Requests",
"routeType": "too-many-requests",
"type": "route",
"urlPrefix": "too-many-requests"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"appPageId": "3772c2ec-1566-4ffa-9231-d5db8d42b47d",
"componentName": "community_layout:sldsFlexibleLayout",
"id": "e02c0193-8cb2-41b6-8298-f31c4f3a3f3f",
"label": "Too Many Requests",
"regions": [
{
"components": [
{
"componentAttributes": {
"backgroundImageConfig": "",
"backgroundImageOverlay": "rgba(0,0,0,0)",
"sectionConfig": "{\"UUID\":\"e0116551-6269-4c76-9153-b53947c825f6\",\"columns\":[{\"UUID\":\"697dc642-1f91-45bb-bfe9-32edb6b4ded3\",\"columnName\":\"Column 1\",\"columnKey\":\"col1\",\"columnWidth\":\"12\",\"seedComponents\":null}]}"
},
"componentName": "community_layout:section",
"id": "e0116551-6269-4c76-9153-b53947c825f6",
"regions": [
{
"components": [
{
"componentAttributes": {
"richTextValue": "<div style=\"display: flex; align-items: center; flex-direction: column; margin: 60px 25px 30px 25px;\">\n\t<div style=\"background-image: url(assets/img/tooManyRequests.svg); background-size: contain; height: 350px; width: 100%; background-repeat: no-repeat; background-position: center;\"></div>\n</div>\n<div style=\"margin: 0 25px; text-align: center;\">\n\t<h1 class=\"slds-text-heading_large\">Looks like the site is experiencing higher than usual demand&#8230;</h1>\n\t<p class=\"slds-text-heading_small\">Don't go anywhere. We'll redirect you in a moment.</p>\n</div>"
},
"componentName": "community_builder:htmlEditor",
"id": "6605c4cd-82ee-4dda-a99e-69a966c79531",
"renderPriority": "NEUTRAL",
"renditionMap": {},
"type": "component"
},
{
"componentAttributes": {},
"componentName": "experience_availability:autoRefresh",
"id": "801c639b-80e9-4310-9fe9-675f8276ca19",
"renderPriority": "NEUTRAL",
"renditionMap": {},
"type": "component"
}
],
"id": "697dc642-1f91-45bb-bfe9-32edb6b4ded3",
"regionLabel": "Column 1",
"regionName": "col1",
"renditionMap": {},
"type": "region"
}
],
"renderPriority": "NEUTRAL",
"renditionMap": {},
"scopedBrandingSetId": null,
"type": "component"
}
],
"id": "abdedd52-9d13-4def-8cfb-de7f417ea970",
"regionName": "content",
"type": "region"
}
],
"themeLayoutType": "ServiceNotAvailable",
"type": "view",
"viewType": "too-many-requests"
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
<selfRegistration>false</selfRegistration>
<sendWelcomeEmail>true</sendWelcomeEmail>
<site>Logger_Test_Site</site>
<siteArchiveStatus>NotArchived</siteArchiveStatus>
<status>UnderConstruction</status>
<tabs>
<defaultTab>home</defaultTab>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
<ApexPage xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>54.0</apiVersion>
<apiVersion>55.0</apiVersion>
<availableInTouch>false</availableInTouch>
<confirmationTokenRequired>false</confirmationTokenRequired>
<description>Página predeterminada de límite superado de Plataforma Lightning</description>
Expand Down
2 changes: 1 addition & 1 deletion config/experience-cloud/pages/ChangePassword.page-meta.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
<ApexPage xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>54.0</apiVersion>
<apiVersion>55.0</apiVersion>
<availableInTouch>false</availableInTouch>
<confirmationTokenRequired>false</confirmationTokenRequired>
<description>Página de cambio de contraseña predeterminada de Sitios de Salesforce</description>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
<ApexPage xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>54.0</apiVersion>
<apiVersion>55.0</apiVersion>
<availableInTouch>false</availableInTouch>
<confirmationTokenRequired>false</confirmationTokenRequired>
<description>Página de inicio de experiencias predeterminadas</description>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
<ApexPage xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>54.0</apiVersion>
<apiVersion>55.0</apiVersion>
<availableInTouch>false</availableInTouch>
<confirmationTokenRequired>false</confirmationTokenRequired>
<description>Página de inicio de sesión para experiencias predeterminadas</description>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
<ApexPage xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>54.0</apiVersion>
<apiVersion>55.0</apiVersion>
<availableInTouch>false</availableInTouch>
<confirmationTokenRequired>false</confirmationTokenRequired>
<description>Página de inscripción automática de experiencias predeterminadas</description>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
<ApexPage xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>54.0</apiVersion>
<apiVersion>55.0</apiVersion>
<availableInTouch>false</availableInTouch>
<confirmationTokenRequired>false</confirmationTokenRequired>
<description>Página de confirmación de registro de experiencias predeterminadas</description>
Expand Down
2 changes: 1 addition & 1 deletion config/experience-cloud/pages/Exception.page-meta.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
<ApexPage xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>54.0</apiVersion>
<apiVersion>55.0</apiVersion>
<availableInTouch>false</availableInTouch>
<confirmationTokenRequired>false</confirmationTokenRequired>
<description>Página predeterminada de Plataforma Lightning para errores post-autenticación</description>
Expand Down
2 changes: 1 addition & 1 deletion config/experience-cloud/pages/FileNotFound.page-meta.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
<ApexPage xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>54.0</apiVersion>
<apiVersion>55.0</apiVersion>
<availableInTouch>false</availableInTouch>
<confirmationTokenRequired>false</confirmationTokenRequired>
<description>Página predeterminada de página/datos no encontrados de Plataforma Lightning</description>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
<ApexPage xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>54.0</apiVersion>
<apiVersion>55.0</apiVersion>
<availableInTouch>false</availableInTouch>
<confirmationTokenRequired>false</confirmationTokenRequired>
<description>Página Contraseña olvidada predeterminada de Sitios de Salesforce</description>
Expand Down
2 changes: 1 addition & 1 deletion config/experience-cloud/pages/InMaintenance.page-meta.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
<ApexPage xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>54.0</apiVersion>
<apiVersion>55.0</apiVersion>
<availableInTouch>false</availableInTouch>
<confirmationTokenRequired>false</confirmationTokenRequired>
<description>Página predeterminada de Plataforma Lightning en mantenimiento</description>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
<ApexPage xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>54.0</apiVersion>
<apiVersion>55.0</apiVersion>
<availableInTouch>false</availableInTouch>
<confirmationTokenRequired>false</confirmationTokenRequired>
<description>Página Confirmación de registro de usuario predeterminada de Sitios de Salesforce</description>
Expand Down
5 changes: 2 additions & 3 deletions config/experience-cloud/sites/Logger_Test_Site.site-meta.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@
<redirectToCustomDomain>false</redirectToCustomDomain>
<referrerPolicyOriginWhenCrossOrigin>true</referrerPolicyOriginWhenCrossOrigin>
<selfRegPage>CommunitiesSelfReg</selfRegPage>
<siteAdmin>test-fd2x1e6fmccz@example.com</siteAdmin>
<siteGuestRecordDefaultOwner>test-fd2x1e6fmccz@example.com</siteGuestRecordDefaultOwner>
<siteAdmin>test-1lmkfiy4nibq@example.com</siteAdmin>
<siteGuestRecordDefaultOwner>test-1lmkfiy4nibq@example.com</siteGuestRecordDefaultOwner>
<siteType>ChatterNetwork</siteType>
<subdomain>orion-process-5557-17ea0f6ee31</subdomain>
<urlPathPrefix>logger</urlPathPrefix>
</CustomSite>
20 changes: 20 additions & 0 deletions docs/apex/Log-Management/LogEntryTagHandler.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,26 @@ Handles trigger events for the `LogEntryTag__c` object

### Methods

#### `generateUniqueId(LogEntryTag__c logEntryTag)``String`

Generates a unique composite key for the `LogEntryTag__c` record, which is used to set the field `LogEntryTag__c.UniqueId__c`

##### Parameters

| Param | Description |
| ------------- | ------------------------------------------------------------- |
| `logEntryTag` | The `LogEntryTag__c` record to use for generating a unique ID |

##### Return

**Type**

String

**Description**

The unique composite key for the record

#### `getSObjectType()``Schema.SObjectType`

Returns SObject Type that the handler is responsible for processing
Expand Down
35 changes: 0 additions & 35 deletions docs/apex/Log-Management/LoggerEmailUtils.md

This file was deleted.

12 changes: 7 additions & 5 deletions docs/apex/Logger-Engine/LogEntryEventBuilder.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,18 @@ Builder class that generates each `LogEntryEvent__e` record

### Constructors

#### `LogEntryEventBuilder(LoggingLevel entryLoggingLevel, Boolean shouldSave)`
#### `LogEntryEventBuilder(LoggerSettings__c userSettings, LoggingLevel entryLoggingLevel, Boolean shouldSave, Set<String> ignoredOrigins)`

Used by `Logger` to instantiate a new instance of `LogEntryEventBuilder`

##### Parameters

| Param | Description |
| ------------------- | ------------------------------------------------------------------------------------ |
| `entryLoggingLevel` | The `LoggingLevel` enum to use for the builder&apos;s instance of `LogEntryEvent__e` |
| `shouldSave` | Determines if the builder&apos;s instance of `LogEntryEvent__e` should be saved |
| Param | Description |
| ------------------- | ------------------------------------------------------------------------------------------------------------------ |
| `userSettings` | The instance of `LoggerSettings__c` for the current to use to control any feature flags |
| `entryLoggingLevel` | The `LoggingLevel` value to use for the log entry |
| `shouldSave` | Indicates if the builder&apos;s instance of `LogEntryEvent__e` should be saved |
| `ignoredOrigins` | A `Set&lt;String&gt;` of the names of any Apex classes that should be ignored when parsing the entry&apos;s origin |

---

Expand Down
10 changes: 10 additions & 0 deletions docs/apex/Logger-Engine/Logger.md
Original file line number Diff line number Diff line change
Expand Up @@ -3342,6 +3342,16 @@ String

The current version number, in the format `v0.0.0`

#### `ignoreOrigin(Type apexType)``void`

Adds the specified Apex type to the list of ignored origin locations for the current transaction. Any ignored types will be removed from the StackTrace\_\_c field, and will be skipped when determining the log entry&apos;s origin location

##### Parameters

| Param | Description |
| ---------- | ------------------------------------ |
| `apexType` | The Apex type of the class to ignore |

#### `info(LogMessage logMessage, Database.DeleteResult deleteResult)``LogEntryEventBuilder`

Creates a new log entry with logging level == `LoggingLevel.INFO`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>54.0</apiVersion>
<apiVersion>55.0</apiVersion>
<status>Active</status>
</ApexClass>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>54.0</apiVersion>
<apiVersion>55.0</apiVersion>
<status>Active</status>
</ApexClass>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>54.0</apiVersion>
<apiVersion>55.0</apiVersion>
<status>Active</status>
</ApexClass>
Loading

0 comments on commit 3f20f6f

Please sign in to comment.