Skip to content

Post-install setup

Installing the package is step one. Before logs actually persist, you also need to assign permission sets, configure the LoggerSettings__c hierarchy, and (usually) schedule the log purge batch. This page walks through each.

1. Assign permission sets

Nebula Logger ships four permission sets. Pick the right one for each user population.

Permission SetPurposeTypical users
LoggerAdminFull control of Nebula Logger data and featuresPlatform admins, support leads
LoggerLogViewerRead-only access to logs and console featuresOperations, QA, support analysts
LoggerEndUserLimited day-to-day access with controlled visibilityBusiness users who need log visibility
LoggerLogCreatorMinimal access needed to generate logsIntegration users, Experience Cloud component users

Assign via UI (Setup > Permission Sets) or CLI:

Terminal window
sf org assign permset --name LoggerAdmin --target-org <alias>

Repeat per user or use permission set groups for bulk assignment.

2. Configure LoggerSettings__c at the org default

LoggerSettings__c is a hierarchy custom setting - values cascade org default -> profile -> user. Start by setting an org-default record so something is defined for every user.

Via the Logger Console

  1. Open the Logger Console Lightning app.
  2. Open the Logger Settings utility bar item (or the settings component on the home page).
  3. Set at least these fields at the org default level:
FieldRecommended starting value
IsEnabled__ctrue
LoggingLevel__cINFO in production, DEBUG or FINE in lower environments
DefaultSaveMethod__cEVENT_BUS (default is fine for most orgs)
DefaultLogPurgeAction__cDelete (default)
DefaultNumberOfDaysToRetainLogs__cSomething reasonable for your storage budget (30-90 days is a common choice)

Via Apex

Nebula__LoggerSettings__c settings = new Nebula__LoggerSettings__c(
SetupOwnerId = UserInfo.getOrganizationId(),
IsEnabled__c = true,
LoggingLevel__c = 'INFO',
DefaultSaveMethod__c = 'EVENT_BUS',
DefaultNumberOfDaysToRetainLogs__c = 30
);
insert settings;

Drop the Nebula__ prefix if you installed the unlocked package.

Note: older references may mention DefaultLoggingLevel__c. The active field is LoggingLevel__c.

3. Schedule the log purge batch

Nebula Logger sets LogRetentionDate__c on new Log__c records automatically, but nothing purges old logs until you schedule the batch job.

Run once from anonymous Apex:

String cronExpression = '0 0 2 * * ?'; // Every day at 2:00 AM
System.schedule('Nebula Logger - Daily Purge', cronExpression, new LogBatchPurgeScheduler());

Verify: Setup > Scheduled Jobs. You should see Nebula Logger - Daily Purge listed. Without this step, retention dates get set but nothing acts on them.

4. Smoke test

Prove the install works end to end.

Logger.info('Nebula Logger install smoke test');
Logger.saveLog();

Then query:

[SELECT Id, TransactionId__c, LoggingLevel__c FROM Log__c ORDER BY CreatedDate DESC LIMIT 1];
[SELECT Id, LogRetentionDate__c FROM Log__c ORDER BY CreatedDate DESC LIMIT 1];

The Log__c record should exist with a populated LogRetentionDate__c. If it doesn’t, the most common cause is missing permission set assignment - LoggerEndUser for user contexts, LoggerLogCreator for integration/component contexts.

First-run troubleshooting

  • No Log__c records after calling saveLog(): check that the calling user has one of the four permission sets assigned. This is by far the most common issue.
  • LogRetentionDate__c is null: LoggerSettings__c.DefaultNumberOfDaysToRetainLogs__c is not set at the effective hierarchy level for the logging user. Retention date is only calculated when a value is present.
  • Logs never purge: LogBatchPurgeScheduler was never scheduled. See step 3.
  • Entries at DEBUG / FINE / FINER / FINEST don’t persist: LoggerSettings__c.LoggingLevel__c is set higher than the level you’re calling. Lower it.

Where next