New Logger Parameter record 'OrganizationAllowlist' to control logging#994
Open
jongpie wants to merge 8 commits into
Open
New Logger Parameter record 'OrganizationAllowlist' to control logging#994jongpie wants to merge 8 commits into
jongpie wants to merge 8 commits into
Conversation
…ovide an optional way to control via CMDT if logging should be enabled in the current org
Codecov Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added a new
LoggerParameter__mdtrecord,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:
OrganizationAllowlistis blank/empty): theOrganizationAllowlistrecord has no impact on logging / logging is fully controlled byLoggerSettings__crecords.LoggerSettings__c.IsEnabled__c.LoggerSettings__c.IsEnabled__c.Important
TODO: right now, this means that if the
OrganizationAllowlisthas 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 onOrganization🤔