Skip to content

New Logger Parameter record 'OrganizationAllowlist' to control logging#994

Open
jongpie wants to merge 8 commits into
mainfrom
feature/new-organization-allowlist-logger-parameter
Open

New Logger Parameter record 'OrganizationAllowlist' to control logging#994
jongpie wants to merge 8 commits into
mainfrom
feature/new-organization-allowlist-logger-parameter

Conversation

@jongpie
Copy link
Copy Markdown
Owner

@jongpie jongpie commented Jun 2, 2026

Added a new LoggerParameter__mdt record, OrganizationAllowlist, to provide an optional way to control via custom metadata (CMDT) if logging should be enabled in the current org. This is useful in situations where sandboxes are created from a prod org (which clones prod's CMDT records), and orgs don't want logging to be enabled by default in new sandboxes.

There are 3 ways this record can be configured:

  1. Out of the box (when OrganizationAllowlist is blank/empty): the OrganizationAllowlist record has no impact on logging / logging is fully controlled by LoggerSettings__c records.
  2. When the current org's 15 or 18 character ID is present: logging is enabled based on LoggerSettings__c.IsEnabled__c.
  3. When the current org's ID is NOT present: logging is disabled for the whole org, regardless of what's been configured in LoggerSettings__c.IsEnabled__c.

Important

TODO: right now, this means that if the OrganizationAllowlist has org IDs populated & the CMDT records are deployed to a scratch org, then logging will be disabled in the scratch org... and since scratch orgs are temporary environments, it's not feasible to add their org IDs. There may need to be slightly different behavior for scratch orgs - but determining that the current environment is a scratch org requires using a SOQL query on Organization 🤔

@jongpie jongpie added Type: Enhancement New feature or request Layer: Configuration Items related to the custom hierarchy setting LoggerSettings__c or any included custom metadata type Layer: Logger Engine Items related to the core logging engine labels Jun 2, 2026
@jongpie jongpie temporarily deployed to Base Scratch Org June 2, 2026 19:17 — with GitHub Actions Inactive
@jongpie jongpie temporarily deployed to Event Monitoring Scratch Org June 2, 2026 19:17 — with GitHub Actions Inactive
@jongpie jongpie temporarily deployed to Advanced Scratch Org June 2, 2026 19:17 — with GitHub Actions Inactive
@jongpie jongpie temporarily deployed to Platform Cache Scratch Org June 2, 2026 19:29 — with GitHub Actions Inactive
@jongpie jongpie temporarily deployed to OmniStudio Scratch Org June 2, 2026 19:33 — with GitHub Actions Inactive
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.77%. Comparing base (05ce16c) to head (31add21).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #994      +/-   ##
==========================================
+ Coverage   93.76%   93.77%   +0.01%     
==========================================
  Files          58       58              
  Lines        6335     6346      +11     
  Branches      204      204              
==========================================
+ Hits         5940     5951      +11     
  Misses        393      393              
  Partials        2        2              
Flag Coverage Δ
Apex 93.10% <100.00%> (+0.01%) ⬆️
LWC 96.27% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jongpie jongpie temporarily deployed to Experience Cloud Scratch Org June 2, 2026 19:40 — with GitHub Actions Inactive
@jongpie jongpie temporarily deployed to Base Scratch Org June 2, 2026 19:53 — with GitHub Actions Inactive
@jongpie jongpie temporarily deployed to Base Scratch Org June 2, 2026 20:09 — with GitHub Actions Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Layer: Configuration Items related to the custom hierarchy setting LoggerSettings__c or any included custom metadata type Layer: Logger Engine Items related to the core logging engine on hold Plugin: Slack Type: Enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants