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
steven.fouracresteven.fouracre 

How can you query using apex to retrieve the System Debug log as it appears in the Log

Ive attempted to query on ApexLog object and also tried using ToolingAPI to hopefully return a debug log, but nothing appears to work

Can anyone help?
ADITYA BHASINADITYA BHASIN
Hi Steven,

Can you share the query or process you are using in it?

Also, can you use the below query and confirm whether issue still persists.

Select Id, LogUserId, LogLength, LastModifiedDate, Request, Operation, Application, Status, DurationMilliseconds, SystemModstamp, StartTime, Location FROM ApexLog 

Thanks,
Aditya Bhasin