EventLogFile

Represents event log files for event monitoring. The event monitoring product gathers information about your Salesforce org’s operational events, which you can use to analyze usage trends and user behavior. This object is available in API version 32.0 and later. The Interval and Sequence fields are available only in API version 37.0 and later.

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. For more information, see EventLogFile Supported Event Types.

Note

Note

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.

For details about event monitoring, see the Trailhead Event Monitoring module or REST API Developer’s Guide.

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()

Fields

Field Details
EventType
Type
picklist
Properties
Filter, Group, Restricted picklist, Sort
Description
The event type—API, Login, Report, URI, and so forth. Use to determine which files were generated for your org. For the corresponding LogFile schema, see EventLogFile Supported Event Types.
Interval
Type
picklist
Properties
Filter, Group, Nillable, Restricted picklist, Sort
Description
The generation schedule for the event log file. Possible values are:
  • Daily
  • Hourly
This field is available in API version 37.0 and later.
LogDate
Type
dateTime
Properties
Filter, Sort
Description
The date and time of the log file’s creation. For daily event log files, tracks usage activity for a 24-hour period, from 12:00 a.m. to 11:59 p.m. UTC time. For hourly event log files, indicates the hour in which the log file was generated. For example, for events that occur between 11:00 AM and 12:00 PM on 3/7/2016, this field’s value is 2016-03-07T11:00:00.000Z.
Note

Note

For hourly event log files, we recommend using CreatedDate to query the date and time that an EventLogFile object was created.

LogFile
Type
base64
Description
Encoded file data in .csv format. The EventType field defines the schema for this data.
LogFileContentType
Type
string
Properties
Filter, Group, Sort
Description
The content type of the log file; always .csv.
LogFileFieldNames
Type
string
Properties
Nillable
Description
The ordered list of fields in the log file data.
Note

Note

LogFileFieldNames and LogFileFieldTypes are specific to each EventType. For example, LogFileFieldNames has a different value for an API EventType and a Login EventType.

LogFileFieldTypes
Type
string
Properties
Nillable
Description
The ordered list of field types in the log file data (String, Id, and so forth).
Note

Note

LogFileFieldNames and LogFileFieldTypes are specific to each EventType. For example, LogFileFieldTypes has a different value for an API EventType and a Login EventType.

LogFileLength
Type
double
Properties
Filter, Sort
Description
The log file length in bytes. You can use this field to plan storage needs for your log files.
Sequence
Type
int
Properties
Filter, Group, Sort
Description
The number for the portion of the event log file data captured in an hour. For 24-hour event log file generation, the value of this field is 0. For hourly event log files, the initial value is 1 and increases by 1 when events are added in the same hour after the latest event log file is created. The value resets to 1 in the subsequent hour. For example, you have activity between 2:00 and 3:00 PM. Two log files are generated that contain the event log data for that hour, with Sequence values of 1 and 2. For event log data that occurs at 3:01 PM, the Sequence value resets to 1. This field is available in API version 37.0 and later.