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”.

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 Error -- essentially anything outside of the Batch job -- the traced entity should be the user that initiated the action.

 

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

6. Create a New Debug Level by clicking "New Debug Level"

7. Name the level "LeanData_Debug" (or similar). Set the “Apex Code” and Apex Profiling to “Finest” to capture a deeper level of detail in the logs. All other category values can remain as the default choices.

8. Once completed, save the debug level and select it. Click "Save" once the Trace Flag is set up completely:

 

9. Once the Start Date time has been reached, logs will begin to populate in the "Debug Logs" section.

Screen_Shot_2021-08-31_at_4.49.50_PM.png

  • Searching for the correct Debug Log is dependent on the error. Typically a log with a Status of "Failure" will be the correct one that captures the error details.
  • If the error is occurring in the LeanDataContinuousBatch, the correct debug log will have an Operation of  “SerialBatchApexRangeChunkHandler”.
  • 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