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
pvelanpvelan 

Debug Logs

Hi, 

 

I have a situation where i dont know which user is calling a method in one of my class, but i need to view the debug logs from that class. Is there a way to turn on the logs for a class for all users??

 

Thanks.

joshbirkjoshbirk

I don't believe so.  Is this a class with a relatively high level of traffic in production? If feasible, you could create a custom object for loggin purposes and store the information about the user there, and then turn on the debug log for the users you need...

pvelanpvelan

This is mainly for development and testing. This class is internally being called from a webservice call and i dont know which user is calling the webservice. I am trying to find the user to avoid going thu the custom logging mechanism. 

Thank you for your suggestion.

joshbirkjoshbirk

In that case another trick you might try is having Apex send out an email with the user information.