New Release v4.8.2 - More Controls for Scenario-Based Logging #373
jongpie
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
LoggerSettings__c.DefaultLogScenario__c
has been renamed toLoggerSettings__c.DefaultScenario__c
, which is treated as a "new" field when upgrading. ExistingLoggerSettings__c
records in your org may need to be updated to move data inLoggerSettings__c.DefaultLogScenario__c
toLoggerSettings__c.DefaultScenario__c
. The original fieldLoggerSettings__c.DefaultScenario__c
is now deprecated & will no longer be used.LogScenarioRule__mdt
has been renamed toLoggerScenarioRule__mdt
, which is treated as a "new" object when upgrading. You will need to migrate any custom metadata records fromLogScenarioRule__mdt
to the new objectLoggerScenarioRule__mdt
. The original objectLogScenarioRule__mdt
is now deprecated & will no longer be used.Core Package Changes
This release is complements some of the changes released in
v4.8.1
, and closes #355 by further enhancing scenario-based loggingLogger.endScenario(String scenario)
suggested by @jamessimone. This provides a way for Apex developers to explicitly end a scenario, which then automatically rolls back to the previous scenario when applicable (and re-applies the previous scenario rule, if one exists)LogEntryEvent__e.EntryScenario__c
andLogEntry__c.EntryScenario__c
(used in addition toLogEntryEvent__e.TransactionScenario__c
andLog__c.TransactionScenario__c
). If multiple scenarios are specified during a transaction, theEntryScenario__c
fields will indicate the specific scenario that was active when an entry was created. Another fantastic suggestion from @jamessimoneLogScenarioRule__mdt
object, replaced it with new objectLoggerScenarioRule__mdt
. This, combined withLogger.endScenario()
, closes Is it possible to configure Logger to not log for specific Apex classes/triggers? #347 (reported by @mikesobczak)Using
LoggerScenarioRule__mdt
, some/all fields onLoggerSettings__c
can be optionally overridden, allowing more control for different modules/groupings of code with an orgUsing the optional
StartTime__c
andEndTime__c
datetime fields, you can control when aLoggerScenarioRule__mdt
should be used. This can be useful in situations where you need to temporarily override someLoggerSettings__c
for your scenarioLogScenarioRule__mdt
Deprecated Object:LoggerScenarioRule__mdt
Revamped Object:Logger.logDatabaseErrors()
overloads to always return a non-null instance ofLogEntryEventBuilder
relatedLogEntries
to remove a poorly-written & non-functioning Apex method that was trying determine the correct tab icon for theLogEntry__c
object. Hardcoding the icon name into the LWC is simpler, uses less resources, and actually functions 😅Slack Plugin Package Changes
LogEntry__c.StackTrace__c
andLogEntry__c.ExceptionStackTrace__c
have been updated to be formatted as code blocks, instead of inline code snippets. This works better in Slack's UI when the fields contain line breaks.v1.5.0
(making a somewhat arbitrary jump fromv0.10.0
, the old version numbers didn't align with the fact that the Slack plugin is production-ready)Other Changes
scripts/data/migrate-log-scenario-field-to-logger-scenario-object.apex
sfdx-project.json
- the updated version numbers are now consistent with the version number tags published in GitHubThis discussion was created from the release More Controls for Scenario-Based Logging.
Beta Was this translation helpful? Give feedback.
All reactions