Object Reference for the Salesforce Platform
EventLogFile
You can interact with event monitoring data by querying fields on the EventLogFile object (like EventType and LogDate). CreatedDate tracks when the log file was generated. To view the underlying event data, query the LogFile field. The EventType determines the schema of this field. Log files don’t count towards your org’s data or file storage allocations. For more information, see EventLogFile Supported Event Types.
Composite requests that include multiple API requests in a single call aren’t supported. In the event of a composite request, EventLogFile captures only the parent request.
Log data schema for each EventType can change. With each new release, use the LogFileFieldNames and LogFileFieldTypes fields to validate the schema changes. In the unlikely case in which no log files are generated for 24 hours, contact Salesforce Customer Support.
Note
Debug and troubleshoot performance issues by correlating logs using the customizable Request Identifier field, available in all Event Monitoring logs. To correlate logs pertaining to an API request call, set the X-SFDC-REQUEST-ID header with a 32 character OTEL compatible TraceId or a 22 -character alphanumeric Id. Using SOQL, search for the Event Monitoring logs with this RequestId to correlate the logs and see the unit of work performed as a part of the API transaction.
Tip
For details about event monitoring, see the Trailhead Event Monitoring module.
Special Access Rules
Accessing this object requires View Event Log Files and API Enabled user permissions. Users with View All Data permission can view event log files.
Supported Calls
describeSObjects(), query(), retrieve()
You can only delete event log file data if you enable the Delete event monitoring data setting in Setup.
Note
Fields
| Field | Details |
|---|---|
| ApiVersion |
|
| EventType |
|
| LogDate |
|
| LogFile |
|
| LogFileContentType |
|
| LogFileFieldNames |
|
| LogFileFieldTypes |
|
| LogFileLength |
|
-
EventLogFile Supported Event Types
The EventType field in the EventLogFile object supports these events. Some common fields, such as CPU_TIME and RUN_TIME, can have null or zero values depending on how the events are generated for a given feature. Sometimes, three quotation marks appear around event data containing special characters in the CSV file. The third quotation mark is necessary for tools and applications to parse the field data at the correct field value boundary.