silenceApexClasses
silenceApexClasses(
connection,classNames,onPhase?):Promise<ApexTraceSilenceOutcome>
Defined in: packages/simply-apex-core/src/apexTraceSilence.ts:122
Creates or updates a 24-hour CLASS_TRACING trace flag with a fully suppressed (NONE) debug level
for each of classNames, preventing those classes from generating debug log output. A class
that already has a trace flag has its expiration extended instead of getting a duplicate.
Parameters
Section titled “Parameters”connection
Section titled “connection”Connection
The org connection to silence classes in.
classNames
Section titled “classNames”string[]
The Apex class names to silence — see resolveClasses.
onPhase?
Section titled “onPhase?”(phase) => void
Called as each of the three phases (checking the debug level, finding the classes, writing trace flags) starts — a caller (the CLI) can use this to update a spinner. Optional; has no effect on the operation itself.
Returns
Section titled “Returns”Promise<ApexTraceSilenceOutcome>
The trace flag created/updated per successfully-silenced class, plus any class names that don’t exist in the org and any per-class create/update failures.
Throws
Section titled “Throws”no-classes-specified if classNames is empty,
debug-level-create-failed if the shared Silence debug level doesn’t exist yet and couldn’t be
created.