1

We have a managed package installed, where we have performed several customizations. Now, it is needed to test the whole solution end-to-end. But i have to issues:

  • Managed package has a VF page pulling data from server each 10 seconds generating many debug logs to be produced, causing impossible to check my code's debug logs, and making dev. console non-responsive

  • Managed package has Batch Apex invoking some customizations i have made, generating many debug logs to be produced, causing impossible to check my code's debug logs, and making dev. console non-responsive

Ideally, i would like to find a way to generate only my debug logs while those processes run. This way, i can check my code's debug logs, and developer console will not get non-responsive. Is there a way to handle this?

2 Answers 2

2

You can accomplish this by changing the Debug log level to INFO or below in your Developer Console.

You can do this from Developer Console "Change Log Level" button as shown below

enter image description here

Select the General Trace Settings to the INFO or below for Apex.

In addition to that pick apex class and set it to finer for that specific Apex class like shown below

enter image description here

The other way to do this is via the Salesforce CLI. The apex tail logs command can be used with the UNIX GREP command to filter the desired entities. Check this video to see this in action via a demo.

1
  • Thank you very much Mohith!! Commented Mar 17, 2022 at 10:03
3

Just to add to Mohith's answer, you would then also want to set your debug statements to fire when log level = info, rather than just the default Debug e.g.

System.debug(LoggingLevel.INFO,'mymsg');

More explanation here

1
  • Thank you so much, very useful information! Commented Mar 17, 2022 at 10:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .