Releases: jongpie/NebulaLogger
Custom Index for Log__c.ParentLogTransactionId__c
- Fixes #847 by adding Log__c.ParentLogTransactionId__c custom index
This is a small release that will help unblock our friends at Google. See the prior release for more!
Fix Stacktrace Parsing & Reduce logger.test.js
Thanks again to @jamessimone for working on yet another awesome release! 🥇 (See PR #835)
Core Unlocked Package Changes
- Fixed an issue in
LoggerStackTrace.js
that would cause an unintended exception when there isn't a valid JavaScript stack trace.- This issue previously could happen when logging within the managed package, as well as in some browser configs that have more restrictive settings enabled.
- Added
@api
decorator to the the functionlogger.setField()
so that it can be used when logging in Aura components.- This function was added in release
v4.14.4
, but wasn't previously accessible by Aura components.
- This function was added in release
- Closed #780 by cleaning up
logger.test.js
, resulting in, 1,400 lines of JavaScript code being removed! 🧹- Over the years, 3 different approaches have been used within Nebula Logger to provide JavaScript logging. The older approaches are considered deprecated, but are still supported - so automated testing is critical to ensuring all approaches still work.
- Previously,
logger.test.js
had test cases duplicated for all 3 approaches, making it a nightmare to maintain. - In this release, @jamessimone streamlined the tests so that the same test cases are now used to validate all 3 approaches.
Installation Info
Core
Unlocked Package - no namespace
- SF CLI:
sf package install --wait 20 --security-type AdminsOnly --package 04t5Y0000015pEnQAI
- Sandbox: https://test.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000015pEnQAI
- Production: https://login.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000015pEnQAI
OmniStudio Logging Enhancements
Thanks to @jamessimone for several OmniStudio improvements in this release! 🎉 (See PR #835)
Core Unlocked Package Changes
- Closed #814 by adding a new
tryCatch
callable method for OmniStudio withinCallableLogger
- Fixed a
System.TypeException
issue in OmniStudio when attempting to add tags to a log entry withinCallableLogger
- Docs: added some explanatory comments for the OmniStudio-specific code within
CallableLogger
Installation Info
Core
Unlocked Package - no namespace
- SF CLI:
sf package install --wait 20 --security-type AdminsOnly --package 04t5Y0000015pEdQAI
- Sandbox: https://test.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000015pEdQAI
- Production: https://login.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000015pEdQAI
Bugfix for AuthSession with Null LoginHistory Exception
Thanks to @camillerev for this release / PR #831!
Core Unlocked Package Changes
- Added safe navigation operator on
LoginHistory
fromAuthSession
records to avoid aNullPointerException
- Fixed an issue where
Log__c.ImpersonatedBy__c
was not set whenAuthSession
data is queried async
Installation Info
Core
Unlocked Package - no namespace
- SF CLI:
sf package install --wait 20 --security-type AdminsOnly --package 04t5Y0000015p5jQAA
- Sandbox: https://test.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000015p5jQAA
- Production: https://login.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000015p5jQAA
FlowLogger exception message handling
Thanks to @jamessimone for working on this fix, and thanks to @shuylern and @andrewofornikar for reporting the issue & sharing their workarounds!
Core Unlocked Package Changes
- Fixed #827:
FlowLogger
now properly truncates theLogEntryEvent__e.ExceptionMessage__c
field. Previously, long values would have caused an exception & prevented the correspondingLogEntryEvent__e
from being properly published.
Installation Info
Core
Unlocked Package - no namespace
- SF CLI:
sf package install --wait 20 --security-type AdminsOnly --package 04t5Y0000015oklQAA
- Sandbox: https://test.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000015oklQAA
- Production: https://login.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000015oklQAA
Improved Testability of Queries
Core Unlocked Package Changes
- Fixed #687: Improved how records are queried & converted to the inner classes in
LoggerSObjectProxy
, which are used for dynamically interacting with some standard SObject types that don't exist in all orgs (Network
,OmniProcess
, etc.)- These changes improve the testability of this part of the code base, resulting in more thorough tests & improved code coverage for the core package
- Fixed #457 and fixed #812: Changed Nebula Logger's behavior during test execution so that the org's actual CMDT records are now loaded & used (e.g., records in
LoggerParameter__mdt
). This is controlled internally by Nebula Logger via a new Apex classLoggerConfigurationSelector
- This provides admins & developers with the ability to fully test their usage of Nebula Logger, including any customizations that have been made to the included CMDT records
- Internally, Nebula Logger's own tests still only use mock CMDT records - they do not leverage the org's actual CMDT records
- Scope creep: added access for the existing Visualforce page
LogMassDelete
to the permission setsLoggerAdmin
,LoggerLogViewer
, andLoggerEndUser
- This page has been around for ~3 years, but the permission sets didn't explicitly provide access to the page
Async Failure Additions
Plugin Changes - v1.0.3
- Updated
LogFinalizer
to skip logging the async context when no error has occurred - Corrected some test failures caused by changes in core
v4.15.3
(this release), now that the org's actual CMDT records are loaded during tests
Big Object Archiving
Plugin Changes - v0.9.1
- Corrected some test failures caused by changes in core
v4.15.3
(this release), now that the org's actual CMDT records are loaded during tests
Pipeline Changes
- Updated
package.json
+build.yml
to auto-generate apackage.xml
manifest file for the core package's metadata, stored within the repo atnebula-logger/core.package.xml
. Thanks to @Coding-With-The-Force for chatting about this!- Example usage:
sf project deploy start --manifest ./nebula-logger/core.package.xml
- This new file is intended to provide an official
package.xml
file for Nebula Logger to help any teams that meet the 2 criteria below:- Team deploys Nebula Logger's metadata to their orgs (instead of installing the unlocked or managed packages)
- Team leverages
package.xml
manifest files in their deployment/devops process
- Example usage:
- Changed the pipeline to use the base scratch org for codecov.io integration, since this org will have the lowest code coverage of any of the scratch orgs.
- Previously, the advanced scratch org was used, which will always have the highest code coverage. Knowing the highest coverage is a sort-of useful & fun metric, but knowing the minimum code coverage (via the base scratch org) is a much more important aspect to focus on.
- Added some sample CMDT records to
extra-tests
directory (used by the pipeline) to help validate that the org's records are correctly returned by the new query selector class - Upgraded several dev dependencies in
package.json
/ regeneratedpackage-lock.json
Installation Info
Core
Unlocked Package - no namespace
- SF CLI:
sf package install --wait 20 --security-type AdminsOnly --package 04t5Y0000015ok2QAA
- Sandbox: https://test.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000015ok2QAA
- Production: https://login.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000015ok2QAA
Async Failure Additions
Plugin Unlocked Package - no namespace
ℹ️ This release of the plugin requires v4.15.3
of Nebula Logger's core unlocked package (above)
- SF CLI:
sf package install --wait 20 --security-type AdminsOnly --package 04t5Y0000015ok7QAA
- Sandbox: https://test.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000015ok7QAA
- Production: https://login.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000015ok7QAA
Big Object Archiving
Plugin Unlocked Package - no namespace
ℹ️ This release of the plugin requires v4.15.3
of Nebula Logger's core unlocked package (above)
- SF CLI:
sf package install --wait 20 --security-type AdminsOnly --package 04t5Y0000015okCQAQ
- Sandbox: https://test.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000015okCQAQ
- Production: https://login.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000015okCQAQ
Added support for logging instances of Database.EmptyRecycleBinResult and List<Database.EmptyRecycleBinResult>
Thanks to @TrangOul for this release by suggesting issue #804 and implementing it in PR #806! 👏🥳
Core Unlocked Package Changes
This release provides the ability to log instances of Database.EmptyRecycleBinResult
and List<Database.EmptyRecycleBinResult>
. Support was previously added for logging the Database
result classes DeleteResult
, LeadConvertResult
, MergeResult
, SaveResult
, UpsertResult
and UndeleteResult
(for more details see release notes for v4.2.0
, v4.3.0
, v4.7.4
, and v4.10.0
). But EmptyRecycleBinResult
had been overlooked - and in this release, it's now supported like the other result classes 🎉
-
Add new instance method overloads in
LogEntryEventBuilder
forsetDatabaseResult()
to support logging instances ofDatabase.EmptyRecycleBinResult
andList<Database.EmptyRecycleBinResult>
global LogEntryEventBuilder setDatabaseResult(Database.EmptyRecycleBinResult emptyRecycleBinResult); global LogEntryEventBuilder setDatabaseResult(List<Database.EmptyRecycleBinResult> emptyRecycleBinResults);
-
Added new static method overloads in
Logger
to make it easier to log instances ofDatabase.EmptyRecycleBinResult
andList<Database.EmptyRecycleBinResult>
global static LogEntryEventBuilder error(LogMessage logMessage, Database.EmptyRecycleBinResult emptyRecycleBinResult); global static LogEntryEventBuilder error(String message, Database.EmptyRecycleBinResult emptyRecycleBinResult); global static LogEntryEventBuilder warn(LogMessage logMessage, Database.EmptyRecycleBinResult emptyRecycleBinResult); global static LogEntryEventBuilder warn(String message, Database.EmptyRecycleBinResult emptyRecycleBinResult); global static LogEntryEventBuilder info(LogMessage logMessage, Database.EmptyRecycleBinResult emptyRecycleBinResult); global static LogEntryEventBuilder info(String message, Database.EmptyRecycleBinResult emptyRecycleBinResult); global static LogEntryEventBuilder debug(LogMessage logMessage, Database.EmptyRecycleBinResult emptyRecycleBinResult); global static LogEntryEventBuilder debug(String message, Database.EmptyRecycleBinResult emptyRecycleBinResult); global static LogEntryEventBuilder fine(LogMessage logMessage, Database.EmptyRecycleBinResult emptyRecycleBinResult); global static LogEntryEventBuilder fine(LogMessage logMessage, Database.EmptyRecycleBinResult emptyRecycleBinResult); global static LogEntryEventBuilder finer(String message, Database.EmptyRecycleBinResult emptyRecycleBinResult); global static LogEntryEventBuilder finer(String message, Database.EmptyRecycleBinResult emptyRecycleBinResult); global static LogEntryEventBuilder finest(String message, Database.EmptyRecycleBinResult emptyRecycleBinResult); global static LogEntryEventBuilder finest(String message, Database.EmptyRecycleBinResult emptyRecycleBinResult); global static LogEntryEventBuilder logDatabaseErrors(System.LoggingLevel loggingLevel, LogMessage logMessage, List<Database.EmptyRecycleBinResult> emptyRecycleBinResults); global static LogEntryEventBuilder logDatabaseErrors(System.LoggingLevel loggingLevel, String message, List<Database.EmptyRecycleBinResult> emptyRecycleBinResults);
- Simplified + improved readability of some older Apex code throughout the codebase by using the safe navigator operator
?.
and null coalescing operator??
in several places
- Fixed some existing code that caused PMD scan violations in newer versions of PMD/sf code analyzer
Installation Info
Core Unlocked Package - no namespace
Full Changelog: v4.15.1...v4.15.2
- SF CLI:
sf package install --wait 20 --security-type AdminsOnly --package 04t5Y0000015oifQAA
- Sandbox: https://test.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000015oifQAA
- Production: https://login.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000015oifQAA
System.OrgLimits Optimisations
Thanks to @ngreardSF for this release by reporting issue #801 and fixing it in PR #802! 🥳 🎉
Core Unlocked Package Changes
Improved the internal code used to capture details about org limits
- Updated
LogHandler
class to cache the Apex call toSystem.OrgLimits.getMap()
to reduce CPU usage - Added some comments + updated some existing variable names & class name to include 'serializable' to provide a little more context on why there is a custom class for org limits
Installation Info
Core Unlocked Package - no namespace
Full Changelog: v4.15.0...v4.15.1
- SF CLI:
sf package install --wait 20 --security-type AdminsOnly --package 04t5Y0000015ohhQAA
- Sandbox: https://test.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000015ohhQAA
- Production: https://login.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000015ohhQAA
v4.15.0 - Winter '25 Release
Managed Package Release - v4.15.0
This release is for both the unlocked package (as always), as well as the managed package! You can see everything that's changed between v4.14.0
and v4.15.0
by reviewing:
- The v4.15.0 milestone to see all of the issues & pull requests that are included in the this release.
- The diff between v4.14.0 and v4.15.0 to see all of the code & metadata changes that have been committed since the last managed package release.
For orgs that are upgrading to this version of the managed package: There are several enhancements & bugfixes in this release (listed below). A few of the notable highlights:
- 🥳Added support for OmniStudio logging
- 🥳Added support for loosely-coupled dependencies (especially useful for package developers/ISVs/consultants)
- 🥳Added a new & improved
getLogger()
function in JavaScript that replaces the now-deprecatedcreateLogger()
functioncreateLogger()
will continue to be supported, but it's recommended that everyone migrates to the newgetLogger()
function instead
Double Feature: Support for OmniStudio Logging + Loosely-Coupled Dependencies
✅✅Release v4.14.10
: With the new Apex class Nebula.CallableLogger
, 2 great enhancements have been added to Nebula Logger:
- It's now even easier for ISVs, consultants, and package developers to optionally leverage Nebula Logger when its available in your customers' orgs
- OmniStudio logging is now provided out of the box
These 2 enhancements are made possible by having the Nebula.CallableLogger
class implement Apex's Callable
interface.
- The
Nebula.CallableLogger
class was originally released in the unlocked package inv4.14.10
- It was further enhanced in
v4.14.16
For more details on using Nebula.CallableLogger
, check out these wiki pages:
Apex Logging Enhancements
For the method Nebula.Logger.setAsyncContext()
:
- ✅Release
v4.14.15
: Enhanced queueableFinalizerContext
logging messages - 🐞Release
v4.14.11
: Bugfix to updateNebula.Logger.setAsyncContext()
behavior to only set the context the first time a non-null context value is provided
For the class Nebula.LogEntryEventBuilder
:
- ✅Release
v4.14.18
by @alanjaouen: AddsetRecord(System.Iterable<Id> recordsIds)
method overload toNebula.LogEntryEventBuilder
for easily logging instances ofSet<Id>
andList<Id>
- Add some changes related to
HttpRequest
logging viasetHttpRequestDetails()
- ✅Release
v4.14.8
: Added the ability to captureHttpRequest
headers via new method overloadsetHttpRequestDetails(System.HttpRequest request, List<String> headersToLog)
- 🐞Release
v4.14.12
: Deprecated & replacedNebula__HttpRequestEndpoint__c
fields with newNebula__HttpRequestEndpointAddress__c
fields so that endpoints longer than 255 characters can be stored
- ✅Release
For custom field mappings (originally released in release v4.13.14
):
- ✅Release
v4.14.14
: Added new static Apex method overloadsNebula.Logger.setField()
For automatic Apex code snippets (originally released in release v4.13.1
):
- 🐞Release
v4.14.9
: Bugfix to auto-truncate Apex code snippets stored inNebula__LogEntry__c
fields.- Previously, the code snippet was only limited by the number of lines of code - but for Apex classes & triggers that have very looooooooooooong code on some lines, the code snippet could cause the JSON value to exceed the corresponding field's max length
JavaScript Logging Enhancements
- ✅
⚠️ Releasev4.14.13
: Added a new synchronous JavaScript functiongetLogger()
+ deprecated async functioncreateLogger()
- ✅Release
v4.14.4
: Added the option to automatically call Salesforce'slightning-logger
LWC when logging via lightning components- 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.
- When Event Monitoring is available & configured, using this feature creates a "Lightning Logger" event in Event Monitoring. These events & the
lightning-logger
LWC were made generally available (GA) in Salesforce's Spring '24 release. - This is controlled using the new field
Nebula__LoggerSettings__c.Nebula__IsJavaScriptLightningLoggerEnabled__c
, and is disabled/false
by default
- ✅Release
v4.14.6
: Custom Field Mappings Support for Lightning Components- Additional enhancements were also added
- ✅Release
v4.14.17
: Added more details inNebula/logger
LWC'sconsole
statements - 🐞Release
v4.14.2
: Bugfix in the pipeline so that Jest test failures are properly surfaced/correctly cause a pipeline failure
Data Masking
- 🐞Release
v4.14.7
: Fixed an issue with the regular expression used in the included data masking rule for US Social Security Numbers (SSNs). It now uses a more targeted regular expression for identifying SSNs to mask.- Previously, the rule was not restrictive enough in the regular expression used in
SensitiveDataRegEx__c
, which resulted in the rule masking some values that it should have ignored.
- Previously, the rule was not restrictive enough in the regular expression used in
Nebula Logger
Console App Changes
- ✅Release
v4.14.5
: AddedNebula/loggerSettings
LWC to the app's utility bar - 🐞Release
v4.14.3
: Bugfix to correct the visibility rules for the tab "Related Record Details" on flexipageNebula__LogEntryRecordPage
Core Unlocked Package Release - v4.15.0
These changes are new for both the unlocked package and the managed package.
Winter '25 Release Upgrade
- Bumped all metadata to API
v62.0
(Winter '25 release)- Also updated the list of picklist values in several 'API version' picklist fields on
Log__c
andLogEntry__c
- Also updated the list of picklist values in several 'API version' picklist fields on
- Resolved #733 by updating all 5 record flexipages to use the new dynamic highlights component (released in Salesforce's Winter '25 release) in place of compact layouts.
- The compact layouts are still included in the repo, but they're now considered deprecated.
Log__c
Object Changes
- Updated the flexipage
LogRecordPage
to use the newer component 'dynamic related list - single' instead of the older component 'related list - single' for displaying related lists - Updated the order of fields shown on the
LogEntry__c
related list to haveLoggingLevel__c
as one of the first fields (instead of as one of the last fields) - Updated all list views to have the existing field
Log__c.ProfileLink__c
- Added new list views
AllChildLogs
: shows any logs that have a parent log set usingLogger.setParentLogTransactionId(String)
(based onLog__c.ParentLogLink__c != null
)AllImpersonatedLogs
: shows any logs where an admin was impersonating the logging user (based onLog__c.ImpersonatedByUsernameLink__c != null
)
LogEntry__c
Object Changes
- Updated the flexipage
LogEntryRecordPage
to use the newer component 'dynamic related list - single' instead of the older component 'related list - single' for displaying related lists - Added 3 new formula fields on
LogEntry__c
that reference the existing formula fields onLog__c
so that the same data can easily be shown in list views, etc.:ImpersonatedByUsernameLink__c
ParentLogLink__c
ProfileLink__c
- Updated all list views to have the existing field
Log__c.ProfileLink__c
- Added new list views
AllERRORLogEntries
: shows any records whereLogEntry__c.LoggingLevel__c == 'ERROR'
- This is very similar to the existing list view
AllERRORandWARNLogEntries
that shows bothERROR
andWARN
- This is very similar to the existing list view
AllImpersonatedLogEntries
: shows any log entries where an admin was impersonating th...
Added setRecord() Overload for List<Id> and Set<Id> Parameters
Thanks to @alanjaouen for working on these changes & @jamessimone for reviewing! (See PR #792)
Core Unlocked Package Changes
Added a new overload setRecord(System.Iterable<Id> recordsIds)
in LogEntryEventBuilder
to make it easy to log instances of List<Id>
and Set<Id>
. Nebula Logger automatically sets details about the logged IDs on LogEntry__c
, just as it does when calling the method overloads setRecord(SObject record)
, setRecord(List<SObject> records)
, and setRecord(Id recordId)
Example usage:
// Use List<Id>
List<Id> userIdList = new List<Id>{ System.UserInfo.getUserId() };
Logger.info('Example entry that uses List<Id>').setRecord(userIdList);
// Use Set<Id>
Set<Id> userIdSet = new Set<Id>{ System.UserInfo.getUserId() };
Logger.info('Example entry that uses Set<Id>').setRecord(userIdSet);
Installation Info
Core Unlocked Package - no namespace
Full Changelog: v4.14.17...v4.14.18
- SF CLI:
sf package install --wait 20 --security-type AdminsOnly --package 04t5Y0000015ocbQAA
- SFDX CLI:
sfdx force:package:install --wait 20 --securitytype AdminsOnly --package 04t5Y0000015ocbQAA
- Sandbox: https://test.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000015ocbQAA
- Production: https://login.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000015ocbQAA