Diagnostic logging through automations
Pega Robot Studio provides methods that you can use to change logging severity and turn logging on and off during automation execution. You can also add log entries to an automation. The methods are accessible from Toolbox > Utilities section.
The severity value of the Toolbox method overrides the global settings. If you need to have a specific log level enabled in your automation, such as for tracking an exception in a certain part of your automation, use a TurnLoggingOn method and set a desirable logging level, as in the following example:
Adding log entries in an automation
You can also add log entries from specific points in an automation. The Toolbox provides you with several methods that let you add log entries. The methods are accessible from the section of the Toolbox.
To add a log entry to your automation, drag one of the methods to an automation surface, enter a log message and select the severity level at which messages are published.
Depending on the external logging configuration, the log entry may or may not be written. For example, even if the log entry severity level is set to Verbose but the config settings limit logging to Info, the log entry will not be reported.
Using LogController methods
A tea house uses Pega Robotic Automation to obtain its weekly supply of tea. An automation logs into an online store and orders a set of the most popular teas. To complete the order, an automation needs to provide the tea house company's credit card details. For security reasons, logging is temporarily switched off during the procedure so that no credit card details appear in the logs.
In the following image, click the + icons to learn more about using LogController methods:
Check your knowledge with the following interaction:
This Topic is available in the following Modules:
Want to help us improve this content?