+ Start a Discussion
Nihar ANihar A 

System debug statements in Queueable apex

I am trying to write a queueable apex class by implementing the Queueable interface. Everything works fine but the system debug statements that I write in the execute() method are not showing up in the logs. Is it the way that execute method works or is it the problem with logging levels. i do not think its the problem with logging level because I am able to see other system debug statements which are not in execute method in the logs once execution is finished.

Thank you for you time.
Best Answer chosen by Nihar A
SandhyaSandhya (Salesforce Developers) 
Hi,

Batch jobs are asynchronous so, it may take some time depending on system load. It creates separate file for execute and finish call.
Also make sure that you have setup debug logs for current logged user in Monitoring > Debug Logs.
 
 You need to set up "User Trace Flags" with debug level for apex:DEBUG, system:DEBUG to see logs.

Please refer below link for the same.

http://salesforce.stackexchange.com/questions/98907/apex-batch-jobs-logs
 
Hope this helps you!

Please mark it as Best Answer if my reply was helpful. It will make it available for other as the proper solution.
 
Thanks and Regards
Sandhya