nebula-logger-plugin-development

Installation
SKILL.md

Building Plugins for Nebula Logger

Package Compatibility

The plugin framework is only available in the unlocked package. The managed package (namespace Nebula) does not currently expose the plugin extension points.

If you plan to write plugins, install the unlocked package. See nebula-logger-install for the choice.

Note that LoggerPlugin, LoggerPlugin.Triggerable, LoggerPlugin.Batchable, LoggerTriggerableContext, and LoggerBatchableContext are all public (not global). Everywhere else in this skill collection, the guidance is "only rely on global" (see the "Supported API Surface" section of nebula-logger-instrumentation). The plugin framework is a deliberate exception: the extension points are public because they're only reachable inside the unlocked package's own compilation unit. As with any public surface, breaking changes are possible - pin plugins to a Nebula Logger version you've tested against and re-verify after upgrades.

Plugin Framework Overview

Nebula Logger's plugin framework lets you register Apex classes to run inside two extension points:

  1. Trigger extension point - Runs during LoggerSObjectHandler execution on LogEntryEvent__e, Log__c, LogEntry__c, LogEntryTag__c, LoggerScenario__c, and LoggerTag__c triggers. Use this to add fields, enrich data, or send external notifications when a log is created.
  2. Batch extension point - Runs during LogBatchPurger execution. Use this to archive logs to an external system, apply custom purge policies, or emit metrics on purged records before they're deleted.

Both extension points are driven by LoggerPlugin__mdt records. Adding a plugin means: writing an Apex class that implements the right interface (or both, if the plugin has trigger and batch responsibilities), then creating a LoggerPlugin__mdt record that points at it.

Installs
3
GitHub Stars
953
First Seen
Today
nebula-logger-plugin-development — jongpie/nebulalogger