What is Debug level in new Salesforce Edition?

I wanted to set the debug log to test a class but today after few days when I was trying to set it, I saw its new look and feel in winter’16 release. It asked for event, level etc. I am unable to set the “Debug Level”. I have no idea what value to provide there. Can anyone help me in explaining how to set it as It is a mandatory field 🙁

enter image description here

Thanks!
Ruchi

Answer

The debug log got a new name(i think) as Trace Flag.

Few Points to note:

  1. The trace flag can be set to any User, Apex Class or Apex Trigger.
  2. The trace flag can be set to a specific time interval which can be
    set by specifying the stare date and expiration date. The minimum
    interval is half hour and can be set to a maximum of 24 hours.
  3. The Debug Level can be created with specific log levels for each
    category(Apex, Visualforce, Workflow, etc.,). You can create
    multiple Debug level one for very fine grained logs with all logs,
    one for very minimal logs with none in all category. You can create
    new Debug level by clicking New in the lookup window(Couldn’t find
    any other place to create Debug level other than this).
  4. Once the expiration date passed, no logs will be captured for the
    User, Apex Class or Apex Trigger. But the trace flag will be
    available so you can change the Start Date and Expiration Date and
    the logs will be captured for the interval.

Now lets discuss about the real time scenario where the trace flag gets advantage over older debug logs.

Debug logs can capture only 20 logs. You have to click Reset to reset it to start to capture another 20 logs. If you have put the debug logs for an end user and try to capture the logs, you have to repeatedly reset the logs to capture all the logs which is very very cumbersome.

But in trace flags, once you set an interval, all the events happened between that interval will be captured in debug logs with the Debug Level we specified.

Finally, it will be little difficult for moving over from Debug Logs to Trace Flags but the change is healthy and lets the Administrators and Developers debug the issues more quickly and efficiently.

Attribution
Source : Link , Question Author : Ruchi , Answer Author : Vigneshwaran G

Leave a Comment