Logging

The purpose of diagnostic logging is to make more information available as the application executes. Logged errors and warnings can help pinpoint failures within the system that might not be immediately obvious to an end user. More verbose logging can be enabled temporarily to provide a useful picture of how an application is behaving when troubleshooting a problem.

Blue Prism uses a proven and reliable library called NLog to output and record log information. An administrator can fine-tune the amount of information logged, either globally or in specific areas of the application.

Logging levels

Log entries are categorized by level. Entries with a level of Information or upwards are usually recorded as standard. Lower, more detailed levels, such as Debug and Trace, provide more verbose information but need to be enabled.

NLog defines the following levels:

  • Trace – Very detailed logs, which may include high-volume information such as protocol payloads. This log level is typically only enabled during development.
  • Debug – Debugging information, less detailed than Trace, typically not enabled in production environments due to a possible impact on performance.
  • Information – Information messages, which are normally enabled in production environments.
  • Warning – Warning messages, typically for non-critical issues, which can be recovered or which are temporary failures.
  • Error – Error messages – most of the time these are exceptions.
  • Fatal – Very serious errors.

Standard logging configuration

The logging levels are defined within the appsettings.json file in the installation folder for each web site and service. For default installations, these folders are located under C:\Program Files (x86)\Blue Prism\.

You should not need to amend the log configuration settings in the appsettings.json file yourself during normal usage. Blue Prism Customer Support will provide alternative log configuration settings when investigating a problem with the product. If the logging settings are changed in the appsettings.json file, the site will need restarting within IIS.

Amending the logging configuration can affect the performance of the application and special care should be taken if amending in a production environment.

The default configuration writes log entries at information level and upwards (including warnings, errors and fatal errors) to a log file. Log files are written to the directory specified in the LogsFolder setting in the appsettings.json file, typically this is set to ./Logs_{Application}, for example ./Logs_Hub or ./Logs_Interact.

By default, the logging configuration settings in the appsettings.json file are:

Copy
"Logging": {
      "LogsFolder": "./Logs_{Application}",
      "LogLevel": {
        "Default": "Information",
        "System": "Warning",
        "Microsoft": "Warning"
      }
    },

Separate log files are generated based on the log level and the date, and these are reflected in the log filename, such as warns.2021-05-07 or infos.2021-05-07.

Below is an example of a line from an information log file:

[08:58:11.4549] Connect.Core.Actions.UpdateCacheAction - Cache for widgets was updated

The format of this text contains the following elements:

  • Time (using the time zone set on the server) – The date is reflected in the filename.
  • Logger name – This usually identifies the class and namespace from which the log entry originates.
  • The log message.
  • Error information – Only available if exception information is logged. Full details are logged on a separate line below the log message.

Additional logging configuration

Blue Prism has developed additional logging configuration settings that can be added to the appropriate appsettings.json file to capture activity by certain components.

Debugging LDAP

You can configure logging to help debug any issues that may arise when synchronizing Hub with LDAP. You will need to set the logging up in the Authentication Server appsettings.json file before you synchronize the users in the Hub UI.

  1. On the server, navigate to the Authentication Server folder. By default, this is located in C:\Program Files (x86)\Blue Prism\.
  2. Open the appsettings.json file in a text editor.
  3. Locate the Logging section and add "ImsServer.IntegrationServices.Services.LdapConnectionService": "Debug" to the LogLevel section and insert a comma at the end of the line above, for example:

    Copy
    "Logging": {
          "LogsFolder": "./Logs_AuthenticationServer",
          "LogLevel": {
            "Default": "Information",
            "System": "Warning",
            "Microsoft": "Warning",
            "ImsServer.IntegrationServices.Services.LdapConnectionService": "Debug"
          }
        },
  4. Save the file.
  5. Recycle the Authentication Server pool in the IIS Application Pools.

    If you have upgraded from a version prior to 4.3, you will need to recycle the IMS pool.

  6. Restart the Authentication Server site in the IIS Sites.

This creates a file with the prefix "debug" and the appropriate date in the Logs_AuthenticationServer directory.

After successfully solving any issues using the debugging information, you must remove the added line and the comma, save the file and repeat steps 5 and 6. Otherwise, the log file will significantly increase in size and potentially fill the memory.

Log gatherer service

This Windows service removes old product logs from each web server component (Hub, Interact, Authentication Server , Audit Service, Audit Service Listener, Email Service, Log Gatherer Service, IADA, Interact Remote API, SignalR, Submit Form Manager). This service is scheduled to do so on the 7th of every month and the logs are moved to C:\Program Files (x86)\Blue Prism\ArchivedLogs.

You can change the archived log folder path and scheduler date within apppsettings.json – “ArchivedFolder” in C:\Program Files (x86)\Blue Prism\Log Service (default), will allow you to change the archive path and “DayOfMonth” will allow you to change the scheduler date.

Further information

The following links may provide useful further information: