Logging Best Practices Guide PDF
Logging Best Practices Guide PDF
The information contained in this document is the proprietary and confidential information of Blue Prism Limited and should not be
disclosed to a third party without the written consent of an authorised Blue Prism representative. No part of this document may be
reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying without the written
permission of Blue Prism Limited
All trademarks are hereby acknowledged and are used to the benefit of their respective owners.
Blue Prism is not responsible for the content of external websites referenced by this document.
Blue Prism Limited, Centrix House, Crow Lane East, Newton-le-Willows, WA12 9UY, United Kingdom
Registered in England: Reg. No. 4260035. Tel: +44 870 879 3000. Web: www.blueprism.com
Commercial in Confidence
®Blue Prism is a registered trademark of Blue Prism Limited Page 2 of 12
Contents
1. Introduction ..........................................................................................................................................................4
2. Log settings ...........................................................................................................................................................4
2.1. Object: stage logging options ......................................................................................................................4
2.2. Process: stage logging options ....................................................................................................................5
2.3. Runtime Resource Logging Levels ...............................................................................................................6
2.4. Unicode Logging..........................................................................................................................................7
2.5. Log Viewer ..................................................................................................................................................8
3. Best Practice .........................................................................................................................................................9
3.1. General recommendations .........................................................................................................................9
3.2. Security Policy ...........................................................................................................................................10
3.3. Development vs UAT/Production..............................................................................................................11
3.4. Database monitoring ................................................................................................................................11
3.5. Logging Configuration Policy .....................................................................................................................12
3.6. Archive and Backup Policy ........................................................................................................................12
4. Potential Issues ...................................................................................................................................................12
Commercial in Confidence
®Blue Prism is a registered trademark of Blue Prism Limited Page 3 of 12
1. Introduction
This document outlines the best practices on logging settings on stages in processes and objects. The decision as to
which stages are logged and which are not should never be overlooked. A conscious use of the logging settings is
key to prevent and resolve database, performance and archiving problems, as well as to address sensitive data
policies.
2. Log settings
By default, stages used in Process Studio are logged and those in Object Studio are not. This can easily be changed
by modifying the properties of a stage, selection of stages or all stages. Nearly all stage properties windows have a
combo box with the stage logging options:
• Enabled
• Disabled
• Errors Only
Errors only will log the stage only if an error is thrown when the stage runs.
Alternatively, the menu commands Edit > Selected Stages > and Edit > All Stages can be used to modify the stage
logging of more than one stage at a time.
Page information stages are not logged, and Data Items are only logged when their values are used as inputs and
outputs.
• Errors Only - no information will be logged unless the actions produce an error condition
Commercial in Confidence
®Blue Prism is a registered trademark of Blue Prism Limited Page 4 of 12
To quickly set all stages within an Object to be Disabled you can open the Object and choose the option Edit -> All
Stages -> Disabled. This will set logging for all stages within all pages within the Object to be disabled.
Commercial in Confidence
®Blue Prism is a registered trademark of Blue Prism Limited Page 5 of 12
Stage logging can be easily switched on, off or to errors only in the same way as with an Object, i.e. using Edit -> All
Stages.
Note: It is not possible to disable parameter logging for all stages using this method. This setting must be set on
each stage individually. It is therefore very important that each stage's parameter data implications should be
assessed before any Process goes into Production where there is the potential for recording business data in the
Blue Prism logging tables.
Commercial in Confidence
®Blue Prism is a registered trademark of Blue Prism Limited Page 6 of 12
• All Stages - Logs all stages regardless of which stages specifically have Stage Logging set to 'Enabled'. Note
this may slow down operation of any Processes run by the Runtime Resource and will result in fuller logs.
However this may be useful in diagnosing problems.
• Key Stages - Overrides only the following stages:
o Action, Code, Navigate, Process, Read, Write, WaitStart
regardless of which stages specifically have Stage Logging set to 'Enabled'.
Memory Logging
Using the same context menu, it is possible to record the memory levels of a machine in the session logs.
• Log Memory Usage - if enabled, all process log entries are accompanied by a record of how much memory
(Working Set) was in use by the main Blue Prism executable at the time. Additionally, if the logged action
refers to a target application, the identity and memory usage of that target application is also recorded.
• Include Memory Cleanup - enabling this may produce more useful figures when diagnosing suspected
memory leak issues.
• Log Web Service Communication - enabling this causes low-level web service communication to be logged -
specifically, SOAP messages are logged in full detail. For consumed web services, the information is logged
as part of the corresponding session log. For exposed web services, it is logged in the event log for the
relevant Resource PC.
Note: If a Runtime Resource is online when its diagnostics settings are changed, it does not need to be restarted for
the new settings to take effect. It will pick up and begin using the modified settings within two minutes at the most.
Commercial in Confidence
®Blue Prism is a registered trademark of Blue Prism Limited Page 7 of 12
Note: It is generally not recommended to use Unicode, however, there are some instances where it will be required
(i.e. logging text containing non-standard characters like logographic or symbols).
The Log Viewer is used to inspect the log of a session, either as it is running or after it has finished. This is especially
handy for reviewing the workings of a progress and tracking down problems. The Log Viewer has a search function
enabling you to look through the (often numerous) rows of a log and the visibility of columns can be configured to
suit.
Commercial in Confidence
®Blue Prism is a registered trademark of Blue Prism Limited Page 8 of 12
Logs can be displayed in Grid or List view type. The Search function helps to find and highlight keywords and text
analysing all or only specific columns.
3. Best Practice
The decision as to which stages are logged and which are not should not be overlooked:
• Logs are particularly useful during a test phase as a means to investigate bugs.
• However, a live Process running all day can put a vast amount of data into the database, the maintenance
and back up of which should be considered.
• The security or legal implications of storing sensitive data are also something to think about.
Note: When Blue Prism Processes are run by Runtime Resources then they log information into the Blue Prism
database. Over time, and if not regularly monitored and maintained, then the amount of data can get prohibitively
large, potentially affecting the performance of the product and leading to an inability to establish a reliable
automatic archiving function within the Blue Prism product.
Commercial in Confidence
®Blue Prism is a registered trademark of Blue Prism Limited Page 9 of 12
• Logging for stages within a Process can be enabled to whatever level is required to support debugging and
tracing during Development phases, or for auditing and reporting purposes when the Processes are
deployed in a Production environment. The level required will be determined by Blue Prism developers in
Development and Testing phases, and by the business requirements in Production.
• Often a usable audit trail can be created by turning on logging only for the following stages within a
Process:
o All decision stages
o All choice stages
o All Errors
o Work Queue – Get Next Item
• Turn off logging anywhere that might generate large amounts of log data. Look for:
o Loops which use large data sets
o Stages with lots of input or output parameters
• Some Data Item data types logged with parameter logging will consume larger amounts of disk space:
o Collections - especially nested Collections
o Markup for formatted text - for example, JSON data, decoded HTML web pages, or large XML
strings
o Text – large strings of more than 4000 characters in one Data Item
o Images - pictures uploaded into Data Items. Lossless image formats will store more data.
o Binary - strings of binary data
• Avoid running processes 24x7 and instead configure them to stop at least once every 24 hour period. This
will avoid creating a huge single log that later cannot be archived by normal means. There are very few
business requirements that cannot afford a few minutes of downtime each day, and if abolutely necessary
a process could be designed so that each resource took its ‘rest’ at a different time.
Commercial in Confidence
®Blue Prism is a registered trademark of Blue Prism Limited Page 10 of 12
3.3. Development vs UAT/Production
When making the move from a Development or Test environments to one of User Acceptance Testing (UAT), Pre-
Production or Production environments then there is a definite and necessary change required in the logging levels
for the Processes and Objects.
Blue Prism recommendation for moving into UAT, Pre-Prod or Production is to ensure the following:
• All stages within all Objects should be set to DISABLED, or ERRORS ONLY (if necessary)
• All stages within all Processes should be set to DISABLED or ERRORS ONLY, except for
o Work Queue item 'Get Next Item' actions, if the queue item is not holding sensitive data.
o Enable logging for all Decision and Choice stages within the Process
▪ Logging for all Decision and Choice stages could be required only on the Main page if the
process is based on a BP templates. Only Errors logging should be sufficient for all the
other pages.
• All stages within all Processes should have parameter logging set to DISABLED
• Runtime Resources running Production processes should be set to log DEFAULT or KEY STAGES only
• It’s common practice to reduce production logging over time, e.g. on the first day of go-live logging levels
are left high to facilitate audit of the ‘soft launch’ period. As the process settles down the logging is
decreased, e.g. week 1 at 100%, week 2 at 50% etc.
• Periodically run a ‘health check’ on the production environemnt. Logging settings might change after the
implementation of a CR and then inadvertently left enabled at high level.
Commercial in Confidence
®Blue Prism is a registered trademark of Blue Prism Limited Page 11 of 12
3.5. Logging Configuration Policy
Blue Prism provides a template document to help customers to assess and record the logging configuration and
policy. See the Documents section of the Portal.
4. Potential Issues
Potential issues arising from unduly large volumes of logging data are as follows:
• The database performance degrades and the general speed of running Processes also suffers.
• Database queries time out, recording timeout-related errors in the Event Logs and causing Processes to
fail.
• Archiving fails to complete, only archiving small amounts of data when larger volumes were selected.
• Automatic archiving is blocked by an overly large log that cannot be moved due to its size.
Commercial in Confidence
®Blue Prism is a registered trademark of Blue Prism Limited Page 12 of 12