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
sean*harrisonsean*harrison 

Debug Log Filters not working

I'm sure I'm missing something simple but I've set the Filters in Setup>Monitoring>Debug Logs and some some things they seem to work.

 

"Some things" being like when I go to the filters page, that activity shows up in my Debug Logs. The Log begins with a line that reflects my Filter choices:

 

21.0 APEX_CODE,WARN;APEX_PROFILING,INFO

But when I run the test class that I really need to debug, the filters don't have any effect and my debug log reaches it's max. The first line reads:

 

20.0 APEX_CODE,FINE;APEX_PROFILING,FINE;DB,INFO;VALIDATION,INFO;WORKFLOW,FINEST

which seem to indicate that my Filters aren't being applied at all.

 

Anyone know what I'm missing here?

 

is there a way to programmatically set the default LoggingLevel?

 

 

Thanks!

 

 

 

 

 

 

 

Best Answer chosen by Admin (Salesforce Developers) 
Martha_SenetaMartha_Seneta

Hey, I got it working.  It seems like you have to update the filters from the code page, not on the debug log page:

 

"

To set log filters:
  1. From a class or trigger detail page, click Log Filters.
  2. Click Override Log Filters.

    The log filters are set to the default log levels.

  3. Choose the log level desired for each log category.

To learn more about debug log categories, debug log levels, and debug log events, see Setting Debug Log Filters.

"

 

I got those instructions from this page.

 

Note that even after I updated the filters, the first line of the debug log continues to say "23.0 APEX_CODE,FINE;APEX_PROFILING,FINE;DB,INFO;VALIDATION,INFO;WORKFLOW,FINEST".  However, when I read through the log, I can see that my filters were in fact applied.  For example, I had set WORKFLOW to NONE, and in fact there is no longer any tracking of workflow in the log.

All Answers

YogeshAroraYogeshArora
I am also experiencing the same problems that filtering log levels is not having affect actually. If you find any answer from an outside source. Do share the answer here ! thanks !
Martha_SenetaMartha_Seneta

I'm having the same problem!

Martha_SenetaMartha_Seneta

Hey, I got it working.  It seems like you have to update the filters from the code page, not on the debug log page:

 

"

To set log filters:
  1. From a class or trigger detail page, click Log Filters.
  2. Click Override Log Filters.

    The log filters are set to the default log levels.

  3. Choose the log level desired for each log category.

To learn more about debug log categories, debug log levels, and debug log events, see Setting Debug Log Filters.

"

 

I got those instructions from this page.

 

Note that even after I updated the filters, the first line of the debug log continues to say "23.0 APEX_CODE,FINE;APEX_PROFILING,FINE;DB,INFO;VALIDATION,INFO;WORKFLOW,FINEST".  However, when I read through the log, I can see that my filters were in fact applied.  For example, I had set WORKFLOW to NONE, and in fact there is no longer any tracking of workflow in the log.

This was selected as the best answer
sean*harrisonsean*harrison

Thanks for letting us know, Martha!

 

Ironically enough I also stumbled upon that tab myself just yesterday. :P