3

In an effort to remove unwanted ENTERING_MANAGED_PKG messages (which I cannot get rid of in Summer 17, I thought I'd try adding class-specific logging:

  1. From the Dev Console, choose Debug->Change Logging Levels...
  2. Under "Class and Trigger overrides" click the Add Button
  3. In the dialog, select the desired class
  4. Set logging level

However, step 3 is broken. The dialog includes a type-able picklist, but it is only showing me trigger names. If I just type in a class name and click the Add button, an override record is added to the table with a blank name. If I type in a class name that overlaps a trigger name (for example, I want to set logging for "dlrs.RollupService" but there's a trigger named "dlrs.RollupServiceTest2Trigger"), any attempt to click "Add" causes it to autocomplete the trigger name.

1
  • Still seeing this behavior in Winter 19, and still no known issues or workarounds. Commented Nov 1, 2018 at 16:53

1 Answer 1

2
+50

I just tried this in my developer edition org on Winter '19. For some historic reason my developer org has an Apex class and trigger that roughly match the naming conventions you showed in the question. The class name is a subset of the trigger name.

Class name is a subset of the trigger name

Under the Class or Trigger overrides I type "DFB.AccountAdd". Both the class and trigger show up.

enter image description here

I then had to use the Add/Change DebugLevel Action link to define a DebugLevel. If you don't you get an error:

enter image description here

The end result seemed that I had class and trigger specific logging defined:

enter image description here

If you are still having issues with the Developer Console UI, these records are represented by the Tooling API TraceFlag sObjects. You put the class or trigger ID in the TracedEntityId field and set the DebugLevelId to the the predefiend DebugLevel representing the logging levels to apply.

Example TraceFlags

As a REST API Resource POST to create it would go to:

/services/data/v44.0/tooling/sobjects/TraceFlag

With a body of:

{
    "Id":null,
    "TracedEntityId":"01p70000000M9V2AAK",
    "LogType":"CLASS_TRACING",
    "StartDate":"",
    "ExpirationDate":"Thu, 01 Nov 2018 23:07:58 GMT",
    "DebugLevelId":"7dl70000000KylCAAS"
}
1
  • Hmm, you can definitely do something I can't do, at least in the org in question. Will have to try the clear-cache-swap-browsers dance. But the TraceFlag is exactly the workaround I was looking for. Commented Nov 3, 2018 at 15:33

You must log in to answer this question.

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