Skip to main content

Adding a diagnostic log component to an automation

Add a diagnostic log component to an automation

Follow these steps to add a diagnostic log component to an automation.

  1. Ensure the necessary automation is open in a Designer window.
  2. Determine the existing automation design blocks between which to place the log component.
  3. Delete the automation link connecting the two automation design blocks.
  4. From the Toolbox window, locate and expand the Advanced category.
    toolbox adv
  5. Drag and drop the DiagnosticsLog component to the automation. A diagnosticsLog1 is displayed in the automation and on the Local variable tab.
    log auto
  6. Rename the diagnosticLog1 component based on project documentation.
    Note: To name a diagnosticLog component, follow the Log_{name of the automation} naming convention.
    diagnostics log component
  7. On the diagnosticsLog1 Design block, click message to enter the custom log file entry. You can also pass a dynamic value through the input port.
  8. Connect the diagnosticLog1 Design block with the automation links to the automation.
  9. In the Object Hierarchy, click the diagnosticLog1 object. The Properties window updates to display the log component.
  10. In the Properties window, modify the Mode and Type properties as needed.
    Diagnostic log properties
  11. From the menu bar, click File > Save All to save your changes.

Validate the log entry

Follow these steps to validate the recorded log entry.

  1. Navigate to the directory where the log file exists.
    Note: The default location can be identified by entering %appdata% in the address bar of File Explorer.
  2. Double-click the RuntimeLog.txt file to open the log file. The file can be opened in Notepad or another application.
  3. View the log data. the following image is an sample log file.
    runtime log 1
  4. Close the log file application.

This Topic is available in the following Module:

If you are having problems with your training, please review the Pega Academy Support FAQs.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Academy has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice