NebulaLogger icon indicating copy to clipboard operation
NebulaLogger copied to clipboard

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

Open jongpie opened this issue 7 months ago • 0 comments

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().

jongpie avatar Jul 28 '25 21:07 jongpie