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
crm123crm123 

Dynamically Specifying user and log level settings via APIS

Typically, we specify a user to monitor via Setup->Monitoring->Debug Logs. Is there a way to do it via apex code?

 

Use Case:

Custom WebService to update opportunities and other custom objects.

One of the parameters we want on the call is DebugLevel. If DebugLevel is not equal to zero, we want to enable the useraccount for debugging and be able to view the Debug Logs. How can we do this?

 

Thanks.