-
-
Notifications
You must be signed in to change notification settings - Fork 168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New 'Log Scenario Rules' CMDT #237
Conversation
…override the user's logging level for a particular scenario
Codecov Report
@@ Coverage Diff @@
## main #237 +/- ##
==========================================
- Coverage 95.51% 95.45% -0.06%
==========================================
Files 28 28
Lines 2829 2858 +29
Branches 42 42
==========================================
+ Hits 2702 2728 +26
- Misses 126 129 +3
Partials 1 1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
…E.md from sfdx-project.json
7c1d423
to
0901c64
Compare
@jongpie I've tested this version in one of our sandboxes and indeed it works as expected, very nice, thanks!! I do have some feedback on the PR though because the package failed to install on the first try. The package now contains a dashboard, which looks amazing, but since we already were on the limit of 10 dynamic dashboards, I had un-dynamic one of our existing dashboards. That's fine on a sandbox for testing, but will give us problems when deploying this package with the new dynamic dashboard to production.
I don't know if the dashboard could be an optional somehow? |
@jverelst that is some very helpful feedback, thanks for sharing! I had completely forgotten about the limit on dynamic dashboards - to avoid that issue, I'll remove the dashboards & reports from the main unlocked package as part of this PR, and I'll instead put the dashboards/reports into an optional add-on package. That way, anyone that wants to use the dashboard can easily install it in their org, but it will be completely optional. I am also working on some additional features for the new 'Logger Retention Rules' custom metadata type - once I've made a bit more progress, I'll share another beta package link in case you'd like to test the additional changes before I finish this PR. Thanks again for all of your feedback! |
0b131a0
to
0c9931a
Compare
This plugin complements the log retention functionality in LoggerSettings__c & the LoggerScenarioRule__mdt objects The plugin's code is based on my other repo, ApexValidationRules - I've repurposed the core code to be used for configuring log retention rules & conditions
03802c1
to
8b6e3e5
Compare
2dca3a2
to
cdd8ef0
Compare
45731a9
to
590c02f
Compare
590c02f
to
69e9b68
Compare
This PR closes #235 (and further extends the 'scenario' functionality added in #218) - Added new CMDT object
LoggerScenarioRule__mdt
to provide a way to configure scenario-specific behavior. Each rule controls 2 aspects of a scenario:LoggerSettings__c
.LoggerSettings__c
.Example rule
This example rule overrides the user's logging level for the scenario 'some scenario' - after
Logger.setScenario(String)
is called, the user will (temporarily) have their logging level set toFINE
for the remainder of the Apex transaction. It also sets the retention date for the logs to 90 days.With the above rule configured, this script will save only the second log entry (the one logged after calling
Logger.setScenario(String)
, and the log will have a retention date of "TODAY + 90 days"Other Changes
The previous release, v4.6.11, included a new dynamic dashboard. I did not take into consideration that most orgs have a limit of 10 dynamic dashboards, which has caused upgrade issues for several people already. To help with this issue, the dashboard has been removed from the core unlocked package, and is now going to be provided as an optional plugin package - any org that wants to use the dashboard (and has not hit their org limit) can install the dashboard plugin on top of Nebula Logger v4.6.12.