I can query debug logs via ApexLog object with SOQL, but the result doesn't contain an actual message.

How can I access the message? Is it achievable with SOQL or some API?

  • 1
    Explore tooling API for same .I need to do some homework to get to actual answer but thats hint to start Commented Feb 23, 2015 at 13:56

2 Answers 2


Tooling API has support since v 28 to download the Raw Apex Log. See this for more info.

  • Is it possible to get the Raw Apex Log with partner SOAP API? Commented Feb 23, 2015 at 21:53
  • 1
    No, you cannot get the debug log using Partner API or any other Salesforce provided API Commented Feb 23, 2015 at 22:37

It is possible also with REST Api, using the following path:

"/services/data/v29.0/sobjects/ApexLog/" + logId + "/Body/"

The log Id must be known (could be fetched with simple SOQL) and only one log per request can be fetched.

You must log in to answer this question.

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