Skip to content

The managed package should never attempt to call System.debug() #889

@jongpie

Description

@jongpie

In the current version of LogEntryEventBuilder, it only checks the field LoggerSettings__c.IsApexSystemDebugLoggingEnabled__c to determine if it should call System.debug(). But for the managed package (any managed package), calling System.debug() won't work (Salesforce hides the managed package's debug lines from the customer org). This results in a performance tax, with no benefit to the managed package.

The builder class's code needs to be updated to also detect if the code is running in a namespace/managed package - if so, don't call System.debug().

Metadata

Metadata

Assignees

Labels

Layer: Logger EngineItems related to the core logging enginePackage Type: Managed PackageIssues and enhancements that specifically apply to the managed packageType: EnhancementNew feature or request

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions