Skip to content

Reconsider how LoggerScenarioRule__mdt and LoggerSettings__c apply #941

@jongpie

Description

@jongpie

Currently, there are 2 main (and overlapping) ways to control several features within Nebula Logger

  • LoggerSettings__c custom hierarchy settings object: used to control the default org settings, as well as overrides for profiles and users
    • With this setup, user-level settings take priority over profile-level settings, and similarly, profile-level settings take priority over org-level default settings
  • LoggerScenarioRule__mdt custom metadata type: used to override LoggerSettings__c for a particular scenario (denoted by specifying a string value as the scenario, via Apex, Flow, or Lightning Components)

This was designed this way to help with large orgs/teams, where logging needs can vary within the codebase/metadata. For example:

  • Admin wants INFO as the org default, and DEBUG for some profiles & admins (configured via LoggerSettings__c)
  • Developer wants more control (e.g., to have detailed logging in one part of the code), so they use scenarios & LoggerScenarioRule__mdt to adjust settings for their "module"

The problem currently is there's not a way to have different settings within a scenario. For example, if a developer wants to change the logging level to FINEST for a particular user(s), within a particular scenario, there's not currently a way to do that.

All of this needs to be revisited (along with #940) to see if changing how scenario rules & user settings are applied could better handle these kinds of situations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Feature: Data MaskingFeature: Log RetentionItems related to LogBatchPurger or LogBatchPurgeSchedulerFeature: Scenario-Based LoggingItems related to Logger.setScenario(), LoggerScenarioRule__mdt, etc.Layer: ConfigurationItems related to the custom hierarchy setting LoggerSettings__c or any included custom metadata typeLayer: Log ManagementItems related to the custom objects & Logger Console appLayer: Logger EngineItems related to the core logging engineSalesforce Feature: SecurityItems related to the security model (object-level access, field-level security, record sharing)Type: EnhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions