---
schema_version: "1"
id: 6f8e77503d49e50e16d17f2e508c54244005dce6f5f62a2a946c4caccf8bc4d2
title: ApexLog
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/object_reference/sforce_api_objects_apexlog.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_apexlog.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 2b06567c445f76c4896c9118b3f2a498d9bef639dc02672388366a0fbce01ef1
description: Represents a debug log containing information about a transaction, including information about Apex, Visualforce, and workflow and validation rules. This object is available in API version 19.0 and later.
---
# ApexLog

Represents a debug log containing information about a transaction, including information about Apex, Visualforce, and workflow and validation rules. This object is available in API version 19.0 and later.

## Supported Calls

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

## Fields

| Field | Details |
| --- | --- |
| Application | 
Type

string

Properties

Filter, Group, Sort

Description

This value depends on the client type that triggered the log.

- For API clients, this value is the client ID.
- For browser clients, this value is Browser.





 |
| DurationMilliseconds | 

Type

int

Properties

Filter, Group, Sort

Description

Duration of the transaction in milliseconds.



 |
| Location | 

Type

picklist

Properties

Filter, Group, Nillable, Restricted picklist, Sort

Description

Specifies the location of the origin of the log. Values are:

- Monitoring—Log is generated as part of debug log monitoring. These types of logs are maintained for seven days or until a user deletes them.
- SystemLog—Log is generated from the Developer Console. These types of logs are maintained for 24 hours or until the user clears them.





 |
| LogLength | 

Type

int

Properties

Filter, Group, Sort

Description

Length of the log in bytes.



 |
| LogUserId | 

Type

reference

Properties

Filter, Group, Nillable, Sort

Description

ID of the user whose actions triggered the debug log.

This is a polymorphic relationship field.

Relationship Name

LogUser

Relationship Type

Lookup

Refers To

User



 |
| Operation | 

Type

string

Properties

Filter, Group, Sort

Description

Name of the operation that triggered the debug log, such as APEXSOAP, Apex Sharing Recalculation, and so on.



 |
| Request | 

Type

string

Properties

Filter, Group, Sort

Description

Request type. Values are:

- API—Request came from the API
- Application—Request came from the Salesforce user interface





 |
| RequestIdentifier | 

Type

string

Properties

Filter, Group, Nillable, Sort

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

Properties

Filter, Sort

Description

Start time of the transaction.



 |
| Status | 

Type

string

Properties

Filter, Group, Sort

Description

Status of the transaction. This value is either Success, or the text of an unhandled Apex exception.



 |

## Usage

You can read information about this object, as well as delete it, but you can't update or insert it.

#### See Also

- [ApexClass](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_apexclass.htm "Represents an Apex class.")
- [ApexTrigger](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_apextrigger.htm "Represents an Apex trigger.")
- [_Developer Guide_: Apex Developer Guide](https://developer.salesforce.com/docs/atlas.en-us.264.0.apexcode.meta/apexcode/ "
    Developer Guide: Apex Developer Guide - html (New Window)")