---
schema_version: "1"
id: 799f5770c35fe5e0a8e0682c53a41194d05bd14c62a3ee0fba69d9bddc2ace6d
title: Monitor Debug Logs
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/xcloud/264-0-0/code_monitoring_debug_logs.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.code_monitoring_debug_logs.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: dfebc70bcd0b90d830d32147b099d7c2cd50946c588718dbe66ca1de406a5cc7
description: Set trace flags to trigger logging for users, Apex classes, and Apex triggers in the Developer Console or in Setup. Monitor the resulting logs to diagnose problems in your org.
products:
  - Security
release: "264"
---
# Monitor Debug Logs

Set trace flags to trigger logging for users, Apex classes, and Apex triggers in the Developer Console or in Setup. Monitor the resulting logs to diagnose problems in your org.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition">
        <colgroup>
          <col style="width:100%">
        </colgroup>
        <tbody>
          <tr class="">
            <td class="slds-cell-wrap" style="vertical-align:top;">Available in: Salesforce Classic</td>

          </tr>
          <tr class="">
            <td class="slds-cell-wrap" style="vertical-align:top;">
              <p>Available in <strong>Enterprise</strong>, <strong>Developer</strong>, <strong>Performance</strong>,
                <strong>Unlimited</strong>, and <strong>Database.com</strong> Editions
              </p>
              <p style="margin-bottom:0;">The Salesforce user interface
                and Email Services are not available in <strong>Database.com</strong>.</p>
            </td>

          </tr>
        </tbody>
      </table> <table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d38375e80">User Permissions
              Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d38375e80 ">To view, retain, and delete debug logs:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d38375e80 ">View All Data</td>

          </tr>
        </tbody>
      </table>

You can retain and manage debug logs for specific users, including yourself, and for classes and triggers. Setting class and trigger trace flags doesn’t cause logs to be generated or saved. Class and trigger trace flags override other logging levels, including logging levels set by user trace flags, but they don’t cause logging to occur. If logging is enabled when classes or triggers execute, logs are generated at the time of execution.

- **[Set Up Debug Logging](https://help.salesforce.com/s/articleView?id=xcloud.code_add_users_debug_log.htm&release=264.0.0&type=5)**  
    To activate debug logging for users, Apex classes, and Apex triggers, configure trace flags and debug levels in the Developer Console or in Setup. Each trace flag includes a debug level, start time, end time, and log type. The trace flag’s log type specifies the entity you’re tracing.
- **[View Debug Logs](https://help.salesforce.com/s/articleView?id=xcloud.code_viewing_log_details.htm&release=264.0.0&type=5)**  
    The debug log contains information about each transaction, such as whether it was successful and how long it took. Depending on the filters set by your trace flags, the log can contain varying levels of detail about the transaction.
- **[Collect Debug Logs for Guest Users](https://help.salesforce.com/s/articleView?id=xcloud.setup_collect_debug_logs.htm&release=264.0.0&type=5)**  
    Your public users generate a large volume of events, which can quickly fill up your debug logs. When collecting debug logs for guest users, keep in mind that all your public site visitors share one guest user license. One Salesforce user represents all your site's public users.

#### See Also

- [Monitor and Audit Security in Salesforce](https://help.salesforce.com/s/articleView?id=xcloud.security_audit.htm&release=264.0.0&type=5 "Salesforce security is an ongoing practice. Audit changes to your org’s security, including field and setup changes. Track user logins, mobile device access, and user identity verification events.")