ApexLog

Represents a debug log.

To retrieve a raw log by ID, use the REST resource: /sobjects/**ApexLog/id**/Body/. (Available from API version 28.0 or later.)

Version 

Introduced in API version 19.0.

Supported SOAP API Calls 

delete(), describeSObjects(), query(), retrieve()

Supported REST API Methods 

DELETE, GET, HEAD, Query

Fields 

Application 

  • Type: string

  • Required: No

  • Properties: Filter, Group, Sort

  • Description: This value depends on the client type that triggered the log or heap dump.

  • For API clients, this value is the client ID.

  • For browser clients, this value is Browser.

This field is required.

DurationMilliseconds 

  • Type: int

  • Required: No

  • Properties: Filter, Group, Sort

  • Description: The duration of the transaction in milliseconds. This field is required.

Location 

  • Type: picklist

  • Required: No

  • Properties: Filter, Group, Nillable, Restricted picklist, Sort

  • Description: Specifies the location of the origin of the log or heap dump. Values are:

  • Possible values:

    • Monitoring — Monitoring — Generated as part of debug log monitoring, and visible to all administrators. These types of logs are maintained for seven days or until a user deletes them.

    • Profiling — Profiling

    • SystemLog — SystemLog — Generated as part of system log monitoring, and visible only to you. These types of logs are maintained for 24 hours or until the user clears them.

    • Preserved — Preserved

LogLength 

  • Type: int

  • Required: No

  • Properties: Filter, Group, Sort

  • Description: Length of the log or heap dump in bytes. This field is required.

LogUserId 

  • Type: reference

  • Required: No

  • Properties: Filter, Group, Nillable, Sort

  • Description: ID of the user whose actions triggered the debug log or heap dump.

  • Relationship name: LogUser

  • Relationship type: polymorphic

  • Refers to: SelfServiceUser, User

Operation 

  • Type: string

  • Required: No

  • Properties: Filter, Group, Sort

  • Description: Name of the operation that triggered the debug log or heap dump, such as APEXSOAP, Apex Sharing Recalculation, and so on. This field is required.

Request 

  • Type: string

  • Required: No

  • Properties: Filter, Group, Sort

  • Description: Request type. Values are:

  • API—Request came from an API.

  • Application—Request came from the Salesforce user interface.

This field is required.

RequestIdentifier 

  • Type: string

  • Required: No

  • Properties: Filter, Group, Nillable, Sort

  • Introduced: API version 49.0

  • Description: The unique identifier of the request that triggered the debug log. Use this request identifier to correlate multiple debug logs triggered by the same request.

StartTime 

  • Type: datetime

  • Required: No

  • Properties: Filter, Sort

  • Description: Start time of the transaction. This field is required.

Status 

  • Type: string

  • Required: No

  • Properties: Filter, Group, Sort

  • Description: Status of the transaction. This value is either Success, or the text of an unhandled Apex exception. This field is required.

DID THIS ARTICLE SOLVE YOUR ISSUE?
Let us know so we can improve!