Nebula Logger for Salesforce
The most robust logger for Salesforce. Works with Apex, Lightning Components, Flow, Process Builder & Integrations. Designed for Salesforce admins, developers & architects.
Features
- Easily add log entries via Apex, Lightning Components (lwc & aura), Flow & Process Builder to generate 1 consolidated, unified log
- Manage & report on logging data using the
Log__c
andLogEntry__c
objects - Leverage
LogEntryEvent__e
platform events for real-time monitoring & integrations - Enable logging and set the logging level for different users & profiles using
LoggerSettings__c
custom hierarchy setting- In addition to the required fields on this Custom Setting record,
LoggerSettings__c
ships withSystemLogMessageFormat__c
, which uses Handlebars-esque syntax to refer to fields on theLogEntryEvent__e
Platform Event. You can use curly braces to denote merge field logic, eg:{OriginLocation__c}\n{Message__c}
- this will output the contents ofLogEntryEvent__e.OriginLocation__c
, a line break, and then the contents ofLogEntryEvent__e.Message__c
- In addition to the required fields on this Custom Setting record,
- Automatically mask sensitive data by configuring
LogEntryDataMaskRule__mdt
custom metadata rules - View related log entries on any Lighting SObject flexipage by adding the 'Related Log Entries' component in App Builder
- Dynamically assign tags to
Log__c
andLogEntry__c
records for tagging/labeling your logs - Plugin framework: easily build or install plugins that enhance the
Log__c
andLogEntry__c
objects, using Apex or Flow (not currently available in the managed package) - Event-Driven Integrations with Platform Events, an event-driven messaging architecture. External integrations can subscribe to log events using the
LogEntryEvent__e
object - see more details at the Platform Events Developer Guide site - https://developer.salesforce.com/docs/atlas.en-us.platform_events.meta/platform_events/platform_events_subscribe_cometd.htm
Architecture Overview
Nebula Logger is built natively on Salesforce, using Apex, lightning components and various types of objects. There are no required external dependencies. To learn more about the architecture, check out the architecture overview in the wiki.
Installing
Nebula Logger is available as both an unlocked package and a managed package. The metadata is the same in both packages, but there are some differences in the available functionality & features. All examples in README
are for the unlocked package (no namespace) - simply add the Nebula
namespace to the examples if you are using the managed package.
Unlocked Package (Recommended) | Managed Package | |
---|---|---|
Namespace | none | Nebula |
Future Releases | Faster release cycle: new patch versions are released (e.g., v4.4.x ) for new enhancements & bugfixes that are merged to the main branch in GitHub |
Slower release cycle: new minor versions are only released (e.g., v4.x ) once new enhancements & bugfixes have been tested and code is stabilized |
Public & Protected Apex Methods | Any public and protected Apex methods are subject to change in the future - they can be used, but you may encounter deployment issues if future changes to public and protected methods are not backwards-compatible |
Only global methods are available in managed packages - any global Apex methods available in the managed package will be supported for the foreseeable future |
Apex Debug Statements | System.debug() is automatically called - the output can be configured with LoggerSettings__c.SystemLogMessageFormat__c to use any field on LogEntryEvent__e |
Requires adding your own calls for System.debug() due to Salesforce limitations with managed packages |
Apex Stack Traces | Automatically stored in LogEntry__c.StackTrace__c when calling methods like Logger.debug('my message'); |
Requires calling parseStackTrace() due to Salesforce limitations with managed packages. For example:Logger.debug('my message').parseStackTrace(new DmlException().getStackTrace()); |
Logger Plugin Framework | Leverage Apex or Flow to build your own "plugins" for Logger - easily add your own automation to the any of the included objects: LogEntryEvent__e , Log__c , LogEntry__c , LogEntryTag__c and LoggerTag__c . The logger system will then automatically run your plugins for each trigger event (BEFORE_INSERT, BEFORE_UPDATE, AFTER_INSERT, AFTER_UPDATE, and so on). |
This functionality is not currently available in the managed package |
Getting Started
After deploying Nebula Logger to your org, there are a few additional configuration changes needed...
- Assign permission set(s) to users
LoggerLogCreator
provides the minimum access needed for users to generate logs via Apex, Lightning Components, Flow or Process BuilderLoggerEndUser
provides access to generate logs, as well as read-only access to any log records shared with the user.LoggerLogViewer
provides view-all access (read-only) to all log records. This does not provide access to generate logs.LoggerAdmin
provides view-all and modify-all access to all log records.
- Customize the default settings in
LoggerSettings__c
- You can customize settings at the org, profile and user levels
Popular Salesforce Apps and Tools
-
This extension is designed to support developers with Salesforce DX projects. Provides quick visual access to scratch orgs, sandboxes, and other useful features.FreeVisual Studio Code Extension984 Views
-
A comprehensive, 100% native-to-Salesforce event management solution for communities on Experience Cloud.Paid Starting at $69 USD/user/monthApplication/Solution468 Views
-
Build a package.xml file listing all of an Org's metadata componentsFreeCode1,081 Views