-
-
Notifications
You must be signed in to change notification settings - Fork 169
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
Added support for logging Map<Id, SObject> in core, added support for configurable fields in Slack plugin #452
Conversation
…ckNotificationFields, to support customization of the fields shown in Slack notifications This field set can either be directly modified (although changes may be reverted during upgrades), or by creating & specifying another field set in the custom metadata record LoggerParameter.SlackLogNotificationFieldSet I also renamed the remote site setting from Slack.remoteSite-meta.xml to LoggerSlack.remoteSite-meta.xml to consistently have some variation of the word Log in all metadata
…) to support logging maps of SObjects Other types of maps, as well as Set<SObject>, are currently considered out of scope
…htning web security (LWS)
… plugin package, manually generated new package version for slack plugin
…sulted in a few small changes to the field XML files
…er' instead of just 'Logger' for clarity
…ock.json, removed problematic setting 'lockerServiceNext' in scratch definition files
…ifferent emoji for INFO vs lower levels (DEBUG, FINE, FINER, and FINEST)
0283520
to
9e1ced6
Compare
…nded by Known Issue a1p4V000003BIYGQA4 to circumvent an ongoing environment issue
…rsion There seems to be an ongoing issue with newer versions of sfdx that causes issues with linking plugins - @W-12652231
8bd09a8
to
8f998dd
Compare
…-end (E2) tests to verify certain features & behaviors, as well as to provide examples to Apex developers of how to test their usage of Nebula Logger This just has some basic tests for now - it'll evolve over the next few releases
2420e5e
to
bc8abe0
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #452 +/- ##
==========================================
- Coverage 95.26% 94.99% -0.28%
==========================================
Files 56 56
Lines 5623 5676 +53
Branches 114 114
==========================================
+ Hits 5357 5392 +35
- Misses 261 279 +18
Partials 5 5
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jongpie one small question - no worries if you want to bump that API version in a subsequent release though. I think moving responsibility for what the default logging level is in a sandbox to the controller is a great change.
@jamessimone awesome, thanks so much for reviewing! |
Core Package Changes
Apex Logging Improvements
LogEntryEventBuilder.setRecord(Map<Id, SObject> recordIdToRecord)
Logger
directly - I might in a future release, but for now,setRecord()
can be called by chaining the method to one of Logger's methods, likeLogger.info('some message').setRecord(recordIdToRecord)
System.debug()
calls inLogger
to start with 'Nebula Logger' instead of just 'Logger' for clarityAdmin Improvements
LogEntry__c.LoggingLevelWithImage__c
to use a different emoji for INFO (✅) vs lower levels (⚙️ for DEBUG, FINE, FINER, and FINEST)LogEntry__c
to describe the thresholds used to determine which emojis are shown in the formulas (⛔AnimationRule
metadata forLog__c.Status__c
to show confetti when the status changes 🥳 🎊Bugfixes
LogEntryEventHandler
to have an extra null check when processingLogEntryTagRule__mdt
rulesLogger.getUserSettings()
to always use default field values, and makingLoggerSettingsController
responsible for handling prod-specific settingsLogger.getUserSettings()
consistent in all orgs (instead of prod behaving differently from sandboxes/scratch orgs), while still providing the suggested defaults for a prod org via theloggerSettings
LWC/custom tabLoggerSettings__c
have also been updated to provide the most detailed settings by defaultLogger.createSettings()
- this doesn't seem needed in the managed package right now, sopublic
seems sufficient (instead of usingglobal
)Slack Plugin Package Changes
SlackLoggerPlugin
Apex class to leverage a new field set,Log__c.SlackNotificationFields
, to support customization of the fields shown in Slack notificationsLoggerParameter.SlackLogNotificationFieldSet
Slack.remoteSite-meta.xml
toLoggerSlack.remoteSite-meta.xml
to ensure there's consistency in having some variation of the word "Log" in all metadata. Some orgs unintentionally had a previously-existing remote site setting (also named just "Slack") unintentionally overwritten - this name change should help avoid overwriting existing remote site settings for Slack.