Capturing Debug Logs

Have more questions? Submit a request

How to Capture Debug Logs

 

Sometimes it it helpful to capture Salesforce's debug logs. The steps below will show you how to capture these logs.

 

1. Log into Salesforce.

2. In Salesforce setup, quick search “Debug Logs” and then click “New”.

Screen_Shot_2021-08-30_at_4.50.54_PM.png

3. Configure the Trace Flag and choose the Traced entity Type, which would most often be the “User” option.

4. The “Traced Entity Name” should be the LeanData integration user so that we can trace the actions under this user and catch any errors.

  • If it’s a batch error that we are attempting to gather further detail on, the traced Entity should be the LeanData integration User.
  • If it is a Scheduled Routing/DataLoader/Bulk Update Errors, essentially anything outside of the Batch job, the traced entity should be the user that initiated the action.

Screen_Shot_2021-08-30_at_5.10.58_PM.png

 

5. The Start Date and Expiration date should be the window that you would like to capture logs within.

6. Choose the appropriate Debug Level, in most cases this would be the “SFDC Dev Console” level.

Screen_Shot_2021-08-30_at_5.12.39_PM.png

Please Note: If there are APEX Timeout issues in the Batch jobs, you can make a new Debug level and call it “LeanData_Debug”, for example.

 

7. Set the “Apex Code” to the “Debug” option and set the “Apex Profiling” choude to “Finest” to capture a deeper level of detail in the logs. All other category values can remain as the default choices.

Screen_Shot_2021-08-31_at_12.28.55_PM.png

8. Once completed, save the debug level and select it:

Screen_Shot_2021-08-31_at_12.35.53_PM.png

 

Once the logs window has completed and the logs are captured, you can download the results for individual operations to get the debug logs. 

Screen_Shot_2021-08-31_at_4.49.50_PM.png

To find the right debug logs to download, look for the “SerialBatchApexRangeChunkHandler” and click the “View” button.

 

Screen_Shot_2021-08-31_at_5.00.42_PM.png

When you click into the view look for the “ContinuousCleanBatch” on the page, if this is present, this would be the log to send to us for inspection. You can word search this for convenience.

 

Articles in this section

Was this article helpful?
1 out of 1 found this helpful
Share