Closed jongpie closed 2 months ago
Attention: Patch coverage is 97.50000%
with 1 line
in your changes missing coverage. Please review.
Project coverage is 93.16%. Comparing base (
70cecec
) to head (75e026b
).
Files | Patch % | Lines |
---|---|---|
...e/main/logger-engine/lwc/logger/logEntryBuilder.js | 91.66% | 1 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Core Unlocked Package Changes
Resolved #702 2 by adding the optional ability to automatically call Salesforce's
lightning-logger
LWC when logging via lightning components. This then creates a "Lightning Logger" event in Event Monitoring. These events & thelightning-logger
LWC were made generally available (GA) in Salesforce's Spring '24 release.Important Note: for this new feature to work...
Another Important Note: for orgs without Event Monitoring (or with Event Monitoring disabled), essentially nothing will actually happen when this feature is enabled in Nebula Logger in your orgs. It's a fully optional feature specifically for orgs that do have Event Monitoring.
For orgs with Event Monitoring setup:
To enable this in Nebula Logger org-wide, or for a particular profile/user, set the new settings field
LoggerSettings__c.IsJavaScriptLightningLoggerEnabled__c
totrue
(default isfalse
)To enable this in Nebula Logger for a particular scenario (using scenario-based logging), set the new scenario rule field
LoggerScenarioRule__mdt.IsJavaScriptLightningLoggerEnabled__c
totrue
(default isnull
)Once
lightning-logger
has been enabled in Nebula Logger, the JavaScript representation of Nebula Logger's log entry will be logged usinglightning-logger
. From there, Salesforce will do 2 things:New
lightning-logger
console statements will automatically be added your browser's console (just after Nebula Logger's own console statements).New "Lightning Logger" events will automatically be added in Event Monitoring. You can view these events under
Setup
→Event Monitoring
→Event Log File Browser
A few small scope creep items that are also included:
logEntryBuilder.js
andComponentLogger.cls
Logger
where aSystem.debug()
statement for scenario-based logging was using the wrong variableLoggerLogCreator
permission set to remove unnecessary access to the Apex classFlowLogger
Dev/Pipeline Changes
build.yml
--concise
flag onsf apex test run
Created additional scratch def files & added them to
build.yml
- each one corresponds to a specific Salesforce feature that's optionally used by Nebula Logger, including a new one for Event Monitoring, to test the usage oflighting-logger
. The pipeline only creates 2 at a time to avoid the dev hub's limit for active scratch orgs.lightning-logger
, which stores data in Event Monitoring.