function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
pradsy90pradsy90 

DEBUG Logs --- Filtering Messages

Hi -

 

Is there a way we to make the DEBUG Logs only generate and USER_DEBUG messages and suppress everything else?

 

Like a line of code or a system level setting?

 

Thanks is advance for your time.

 

Regards.

Pradhip. S

sfdcfoxsfdcfox
When setting the logging levels, choose "Error" for all levels except for Apex Code, which should be set to Debug. This will suppress most messages except debugs. Alternatively, you can use:

System.debug(System.LoggingLevel.Error, ... )

And set all levels to Error; only those debug messages logged as the LoggingLevel Error will appear in the logs.