Skip to content

Optionally enforce scenario-based logging usage#648

Merged
jongpie merged 7 commits intomainfrom
feature/enforce-scenario-usage
Mar 13, 2024
Merged

Optionally enforce scenario-based logging usage#648
jongpie merged 7 commits intomainfrom
feature/enforce-scenario-usage

Conversation

@jongpie
Copy link
Copy Markdown
Owner

@jongpie jongpie commented Mar 13, 2024

  • Resolved Add a way to enforce the usage of scenarios #645 by adding the ability to optionally enforce using scenario-based logging. This is controlled by a new LoggerParameter__mdt record, RequireScenarioUsage, and is disabled (false) by default.
    • When set to false, specifying a scenario is completely optional.
    • When set to true, a scenario is required to be set before any logging can occur. If a logging method is called & the current scenario is null/blank, then Nebula Logger will throw a runtime exception.
  • Upgraded LoggerScenarioRecordPage flexipage to use dynamic related lists for Log__c and LogEntry__c
  • Added missing field permission for Log__c.TransactionScenario__c to LoggerAdmin permission set

@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 Feature: Scenario-Based Logging Items related to Logger.setScenario(), LoggerScenarioRule__mdt, etc. labels Mar 13, 2024
@jongpie jongpie had a problem deploying to Experience Cloud Scratch Org March 13, 2024 02:50 — with GitHub Actions Error
… to automatically scan changed Apex files for PMD violations
@jongpie jongpie force-pushed the feature/enforce-scenario-usage branch from 4ea1e66 to f8fa572 Compare March 13, 2024 03:04
@jongpie jongpie temporarily deployed to Experience Cloud Scratch Org March 13, 2024 03:08 — with GitHub Actions Inactive
@jongpie jongpie temporarily deployed to Base Scratch Org March 13, 2024 03:08 — with GitHub Actions Inactive
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.06%. Comparing base (11964ad) to head (f8fa572).

❗ Current head f8fa572 differs from pull request most recent head 72eb907. Consider uploading reports for the commit 72eb907 to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #648   +/-   ##
=======================================
  Coverage   95.05%   95.06%           
=======================================
  Files          50       50           
  Lines        5663     5669    +6     
=======================================
+ Hits         5383     5389    +6     
  Misses        280      280           
Flag Coverage Δ
Apex 95.06% <100.00%> (+<0.01%) ⬆️

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.

@jongpie jongpie marked this pull request as ready for review March 13, 2024 18:33
@jongpie jongpie merged commit f6b0afc into main Mar 13, 2024
@jongpie jongpie deleted the feature/enforce-scenario-usage branch March 13, 2024 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature: Scenario-Based Logging Items related to Logger.setScenario(), LoggerScenarioRule__mdt, etc. 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 Type: Enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a way to enforce the usage of scenarios

2 participants