Working with Logs in the Developer Console

Use the Logs tab in the Developer Console to open debug logs.

Use the Logs tab to open relevant debug logs for review

Logs open in Log Inspector. Log Inspector is a context-sensitive execution viewer that shows the source of an operation, what triggered the operation, and what occurred afterward. Use this tool to inspect debug logs that include database events, Apex processing, workflow, and validation logic.

To learn more about working with logs in the Developer Console, see “Log Inspector” in the Salesforce online help.

When using the Developer Console or monitoring a debug log, you can specify the level of information that gets included in the log.
Log category
The type of information logged, such as information from Apex or workflow rules.
Log level
The amount of information logged.
Event type
The combination of log category and log level that specify which events get logged. Each event can log additional information, such as the line and character number where the event started, fields associated with the event, duration of the event in milliseconds, and so on.

Debug Log Categories

You can specify the following log categories. The amount of information logged for each category depends on the log level:

Log Category Description
Database Includes information about database activity, including every data manipulation language (DML) statement or inline SOQL or SOSL query.
Workflow Includes information for workflow rules, such as the rule name, the actions taken, and so on.
Validation Includes information about validation rules, such as the name of the rule, whether the rule evaluated true or false, and so on.
Callout Includes the request-response XML that the server is sending and receiving from an external Web service. This is useful when debugging issues related to using Force.com Web services API calls.
Apex Code Includes information about Apex code and can include information such as log messages generated by DML statements, inline SOQL or SOSL queries, the start and completion of any triggers, and the start and completion of any test method, and so on.
Apex Profiling Includes cumulative profiling information, such as the limits for your namespace, the number of emails sent, and so on.
Visualforce Includes information about Visualforce events, including serialization and deserialization of the view state or the evaluation of a formula field in a Visualforce page.
System Includes information about calls to all system methods such as the System.debug method.

Debug Log Levels

You can specify the following log levels. The levels are listed from lowest to highest. Specific events are logged based on the combination of category and levels. Most events start being logged at the INFO level. The level is cumulative, that is, if you select FINE, the log will also include all events logged at DEBUG, INFO, WARN and ERROR levels.
Note
Not all levels are available for all categories. Only the levels that correspond to one or more events are available.
  • ERROR
  • WARN
  • INFO
  • DEBUG
  • FINE
  • FINER
  • FINEST
Important
Before running a deployment, verify that the Apex Code log level is not set to FINEST. Otherwise, the deployment may take longer than expected. If the Developer Console is open, the log levels in the Developer Console affect all logs, including logs created during a deployment.

Debug Event Types

The following is an example of what is written to the debug log. The event is USER_DEBUG. The format is timestamp | event identifier:
  • timestamp: consists of the time when the event occurred and a value between parentheses. The time is in the user's time zone and in the format HH:mm:ss.SSS. The value represents the time elapsed in milliseconds since the start of the request. The elapsed time value is excluded from logs reviewed in the Developer Console.
  • event identifier: consists of the specific event that triggered the debug log being written to, such as SAVEPOINT_RESET or VALIDATION_RULE, and any additional information logged with that event, such as the method name or the line and character number where the code was executed.
The following is an example of a debug log line.
Debug Log Line Example Debug Log Line Example
In this example, the event identifier is made up of the following:
  • Event name:
    USER_DEBUG
  • Line number of the event in the code:
    [2]
  • Logging level the System.Debug method was set to:
    DEBUG
  • User-supplied string for the System.Debug method:
    Hello world!
The following example of a log line is triggered by this code snippet.
Debug Log Line Code Snippet Debug Log Line Code Snippet
The following log line is recorded when the test reaches line 5 in the code:
15:51:01.071 (55856000)|DML_BEGIN|[5]|Op:Insert|Type:Invoice_Statement__c|Rows:1
In this example, the event identifier is made up of the following:
  • Event name:
    DML_BEGIN
  • Line number of the event in the code:
    [5]
  • DML operation type—Insert:
    Op:Insert
  • Object name:
    Type:Invoice_Statement__c
  • Number of rows passed into the DML operation:
    Rows:1

The following table lists the event types that are logged, what fields or other information get logged with each event, as well as what combination of log level and category cause an event to be logged.

Event Name Fields or Information Logged with Event Category Logged Level Logged
BULK_HEAP_ALLOCATE Number of bytes allocated Apex Code FINEST
CALLOUT_REQUEST Line number and request headers Callout INFO and above
CALLOUT_RESPONSE Line number and response body Callout INFO and above
CODE_UNIT_FINISHED None Apex Code ERROR and above
CODE_UNIT_STARTED Line number and code unit name, such as MyTrigger on Account trigger event BeforeInsert for [new] Apex Code ERROR and above
CONSTRUCTOR_ENTRY Line number, Apex class ID, and the string <init>() with the types of parameters, if any, between the parentheses Apex Code DEBUG and above
CONSTRUCTOR_EXIT Line number and the string <init>() with the types of parameters, if any, between the parentheses Apex Code DEBUG and above
CUMULATIVE_LIMIT_USAGE None Apex Profiling INFO and above
CUMULATIVE_LIMIT_USAGE_END None Apex Profiling INFO and above
CUMULATIVE_PROFILING None Apex Profiling FINE and above
CUMULATIVE_PROFILING_BEGIN None Apex Profiling FINE and above
CUMULATIVE_PROFILING_END None Apex Profiling FINE and above
DML_BEGIN Line number, operation (such as Insert, Update, and so on), record name or type, and number of rows passed into DML operation DB INFO and above
DML_END Line number DB INFO and above
EMAIL_QUEUE Line number Apex Code INFO and above
ENTERING_MANAGED_PKG Package namespace Apex Code INFO and above
EXCEPTION_THROWN Line number, exception type, and message Apex Code INFO and above
EXECUTION_FINISHED None Apex Code ERROR and above
EXECUTION_STARTED None Apex Code ERROR and above
FATAL_ERROR Exception type, message, and stack trace Apex Code ERROR and above
FLOW_ASSIGNMENT_DETAIL Interview ID, Reference, Operator, and Value Workflow FINER and above
FLOW_BULK_ELEMENT_BEGIN Interview ID and Element type Workflow FINE and above
FLOW_BULK_ELEMENT_DETAIL Interview ID, Element type, Element name, Number of records, and Execution time Workflow FINER and above
FLOW_BULK_ELEMENT_END Interview ID, Element type, Element name, and Number of records Workflow FINE and above
FLOW_CREATE_INTERVIEW_BEGIN Organization ID, Definition ID, and Version ID Workflow INFO and above
FLOW_CREATE_INTERVIEW_END Interview ID and Flow name Workflow INFO and above
FLOW_CREATE_INTERVIEW_ERROR Message, Organization ID, Definition ID, and Version ID Workflow ERROR and above
FLOW_ELEMENT_BEGIN Interview ID, Element type, and Element name Workflow FINE and above
FLOW_ELEMENT_END Interview ID, Element type, and Element name Workflow FINE and above
FLOW_ELEMENT_ERROR Message, Element type, and Element name (Flow runtime exception) Workflow ERROR and above
FLOW_ELEMENT_ERROR Message, Element type, and Element name (Spark not found) Workflow ERROR and above
FLOW_ELEMENT_ERROR Message, Element type, and Element name (Designer exception) Workflow ERROR and above
FLOW_ELEMENT_ERROR Message, Element type, and Element name (Designer limit exceeded) Workflow ERROR and above
FLOW_ELEMENT_ERROR Message, Element type, and Element name (Designer runtime exception) Workflow ERROR and above
FLOW_ELEMENT_FAULT Message, Element type, and Element name (Fault path taken) Workflow WARNING and above
FLOW_ELEMENT_FAULT Message, Element type, and Element name (Element deferred) Workflow FINER and above
FLOW_RULE_DETAIL Interview ID, Rule name, and Result Workflow FINER and above
FLOW_START_INTERVIEW_BEGIN Interview ID and Flow name Workflow INFO and above
FLOW_START_INTERVIEW_END Interview ID and Flow name Workflow INFO and above
FLOW_START_INTERVIEWS_BEGIN Requests Workflow INFO and above
FLOW_START_INTERVIEWS_END Requests Workflow INFO and above
FLOW_START_INTERVIEWS_ERROR Message, Interview ID, and Flow name Workflow ERROR and above
FLOW_SUBFLOW_DETAIL Interview ID, Name, Definition ID, and Version ID Workflow FINER and above
FLOW_VALUE_ASSIGNMENT Interview ID, Key, and Value Workflow FINER and above
HEAP_ALLOCATE Line number and number of bytes Apex Code FINER and above
HEAP_DEALLOCATE Line number and number of bytes deallocated Apex Code FINER and above
IDEAS_QUERY_EXECUTE Line number DB FINEST
LIMIT_USAGE_FOR_NS Namespace and the following limits:
Number of SOQL queries

Number of query rows

Number of SOSL queries

Number of DML statements

Number of DML rows

Number of code statements

Maximum heap size

Number of callouts

Number of Email Invocations

Number of fields describes

Number of record type describes

Number of child relationships

 describes

Number of picklist describes

Number of future calls

Number of find similar calls

Number of System.runAs() 

invocations
Apex Profiling FINEST
METHOD_ENTRY Line number, the Force.com ID of the class, and method signature Apex Code DEBUG and above
METHOD_EXIT Line number, the Force.com ID of the class, and method signature.

For constructors, the following information is logged: Line number and class name.

Apex Code DEBUG and above
POP_TRACE_FLAGS Line number, the Force.com ID of the class or trigger that has its log filters set and that is going into scope, the name of this class or trigger, and the log filter settings that are now in effect after leaving this scope System INFO and above
PUSH_NOTIFICATION_INVALID_APP App namespace, app name.

This event occurs when Apex code is trying to send a notification to an app that doesn't exist in the org, or is not push-enabled.

Apex Code ERROR
PUSH_NOTIFICATION_INVALID_CERTIFICATE App namespace, app name.

This event indicates that the certificate is invalid. For example, it’s expired.

Apex Code ERROR
PUSH_NOTIFICATION_INVALID_NOTIFICATION App namespace, app name, service type (Apple or Android GCM), user ID, device, payload (substring), payload length.

This event occurs when a notification payload is too long.

Apex Code ERROR
PUSH_NOTIFICATION_NO_DEVICES App namespace, app name.

This event occurs when none of the users we're trying to send notifications to have devices registered.

Apex Code DEBUG
PUSH_NOTIFICATION_NOT_ENABLED

This event occurs when push notifications are not enabled in your org.

Apex Code INFO
PUSH_NOTIFICATION_SENT App namespace, app name, service type (Apple or Android GCM), user ID, device, payload (substring)

This event records that a notification was accepted for sending. We don't guarantee delivery of the notification.

Apex Code DEBUG
PUSH_TRACE_FLAGS Line number, the Force.com ID of the class or trigger that has its log filters set and that is going out of scope, the name of this class or trigger, and the log filter settings that are now in effect after entering this scope System INFO and above
QUERY_MORE_BEGIN Line number DB INFO and above
QUERY_MORE_END Line number DB INFO and above
QUERY_MORE_ITERATIONS Line number and the number of queryMore iterations DB INFO and above
SAVEPOINT_ROLLBACK Line number and Savepoint name DB INFO and above
SAVEPOINT_SET Line number and Savepoint name DB INFO and above
SLA_END Number of cases, load time, processing time, number of case milestones to insert/update/delete, and new trigger Workflow INFO and above
SLA_EVAL_MILESTONE Milestone ID Workflow INFO and above
SLA_NULL_START_DATE None Workflow INFO and above
SLA_PROCESS_CASE Case ID Workflow INFO and above
SOQL_EXECUTE_BEGIN Line number, number of aggregations, and query source DB INFO and above
SOQL_EXECUTE_END Line number, number of rows, and duration in milliseconds DB INFO and above
SOSL_EXECUTE_BEGIN Line number and query source DB INFO and above
SOSL_EXECUTE_END Line number, number of rows, and duration in milliseconds DB INFO and above
STACK_FRAME_VARIABLE_LIST Frame number and variable list of the form: Variable number | Value. For example:
var1:50

var2:'Hello World'
Apex Profiling FINE and above
STATEMENT_EXECUTE Line number Apex Code FINER and above
STATIC_VARIABLE_LIST Variable list of the form: Variable number | Value. For example:
var1:50

var2:'Hello World'
Apex Profiling FINE and above
SYSTEM_CONSTRUCTOR_ENTRY Line number and the string <init>() with the types of parameters, if any, between the parentheses System DEBUG and above
SYSTEM_CONSTRUCTOR_EXIT Line number and the string <init>() with the types of parameters, if any, between the parentheses System DEBUG and above
SYSTEM_METHOD_ENTRY Line number and method signature System DEBUG and above
SYSTEM_METHOD_EXIT Line number and method signature System DEBUG and above
SYSTEM_MODE_ENTER Mode name System INFO and above
SYSTEM_MODE_EXIT Mode name System INFO and above
TESTING_LIMITS None Apex Profiling INFO and above
TOTAL_EMAIL_RECIPIENTS_QUEUED Number of emails sent Apex Profiling FINE and above
USER_DEBUG Line number, logging level, and user-supplied string Apex Code DEBUG and above by default. If the user sets the log level for the System.Debug method, the event is logged at that level instead.
VALIDATION_ERROR Error message Validation INFO and above
VALIDATION_FAIL None Validation INFO and above
VALIDATION_FORMULA Formula source and values Validation INFO and above
VALIDATION_PASS None Validation INFO and above
VALIDATION_RULE Rule name Validation INFO and above
VARIABLE_ASSIGNMENT Line number, variable name, a string representation of the variable's value, and the variable's address Apex Code FINEST
VARIABLE_SCOPE_BEGIN Line number, variable name, type, a value that indicates if the variable can be referenced, and a value that indicates if the variable is static Apex Code FINEST
VARIABLE_SCOPE_END None Apex Code FINEST
VF_APEX_CALL Element name, method name, and return type Apex Code INFO and above
VF_DESERIALIZE_VIEWSTATE_BEGIN View state ID Visualforce INFO and above
VF_DESERIALIZE_VIEWSTATE_END None Visualforce INFO and above
VF_EVALUATE_FORMULA_BEGIN View state ID and formula Visualforce FINER and above
VF_EVALUATE_FORMULA_END None Visualforce FINER and above
VF_PAGE_MESSAGE Message text Apex Code INFO and above
VF_SERIALIZE_VIEWSTATE_BEGIN View state ID Visualforce INFO and above
VF_SERIALIZE_VIEWSTATE_END None Visualforce INFO and above
WF_ACTION Action description Workflow INFO and above
WF_ACTION_TASK Task subject, action ID, rule, owner, and due date Workflow INFO and above
WF_ACTIONS_END Summary of actions performed Workflow INFO and above
WF_APPROVAL Transition type, EntityName: NameField Id, and process node name Workflow INFO and above
WF_APPROVAL_REMOVE EntityName: NameField Id Workflow INFO and above
WF_APPROVAL_SUBMIT EntityName: NameField Id Workflow INFO and above
WF_ASSIGN Owner and assignee template ID Workflow INFO and above
WF_CRITERIA_BEGIN EntityName: NameField Id, rule name, rule ID, and trigger type (if rule respects trigger types) Workflow INFO and above
WF_CRITERIA_END Boolean value indicating success (true or false) Workflow INFO and above
WF_EMAIL_ALERT Action ID and rule Workflow INFO and above
WF_EMAIL_SENT Email template ID, recipients, and CC emails Workflow INFO and above
WF_ENQUEUE_ACTIONS Summary of actions enqueued Workflow INFO and above
WF_ESCALATION_ACTION Case ID and business hours Workflow INFO and above
WF_ESCALATION_RULE None Workflow INFO and above
WF_EVAL_ENTRY_CRITERIA Process name, email template ID, and Boolean value indicating result (true or false) Workflow INFO and above
WF_FIELD_UPDATE EntityName: NameField Id and the object or field name Workflow INFO and above
WF_FLOW_ACTION_BEGIN ID of flow trigger Workflow INFO and above
WF_FLOW_ACTION_DETAIL ID of flow trigger, object type and ID of record whose creation or update caused the workflow rule to fire, name and ID of workflow rule, and the names and values of flow variables or sObject variables Workflow FINE and above
WF_FLOW_ACTION_END ID of flow trigger Workflow INFO and above
WF_FLOW_ACTION_ERROR ID of flow trigger, ID of flow definition, ID of flow version, and flow error message Workflow ERROR and above
WF_FLOW_ACTION_ERROR_DETAIL Detailed flow error message Workflow ERROR and above
WF_FORMULA Formula source and values Workflow INFO and above
WF_HARD_REJECT None Workflow INFO and above
WF_NEXT_APPROVER Owner, next owner type, and field Workflow INFO and above
WF_NO_PROCESS_FOUND None Workflow INFO and above
WF_OUTBOUND_MSG EntityName: NameField Id, action ID, and rule Workflow INFO and above
WF_PROCESS_NODE Process name Workflow INFO and above
WF_REASSIGN_RECORD EntityName: NameField Id and owner Workflow INFO and above
WF_RESPONSE_NOTIFY Notifier name, notifier email, and notifier template ID Workflow INFO and above
WF_RULE_ENTRY_ORDER Integer and indicating order Workflow INFO and above
WF_RULE_EVAL_BEGIN Rule type Workflow INFO and above
WF_RULE_EVAL_END None Workflow INFO and above
WF_RULE_EVAL_VALUE Value Workflow INFO and above
WF_RULE_FILTER Filter criteria Workflow INFO and above
WF_RULE_INVOCATION EntityName: NameField Id Workflow INFO and above
WF_RULE_NOT_EVALUATED None Workflow INFO and above
WF_SOFT_REJECT Process name Workflow INFO and above
WF_SPOOL_ACTION_BEGIN Node type Workflow INFO and above
WF_TIME_TRIGGER EntityName: NameField Id, time action, time action container, and evaluation Datetime Workflow INFO and above
WF_TIME_TRIGGERS_BEGIN None Workflow INFO and above
© Copyright 2000–2014 salesforce.com, inc. All rights reserved.
Various trademarks held by their respective owners.