+ Start a Discussion

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.



Pradhip. S

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.