In this article:

Introduction

Operation Log

Development Environment Debug Info

Debug Info of Task Scheduler

Advanced Logging and Getting Additional Debug Info

Introduction

When working in Foresight Analytics Platform, the kernel forms and outputs debug info.

To view debug info, use:

Debug info is not saved anywhere by default. In some cases it may be needed to determine the cause of some errors. For this purpose, the user can export debug info to a file. Settings for logging debug info are stored in the the operating system registry. Note that exporting debug info to a file slows down the development environment and application units/forms, that is why remove the parameters specified below after the problem is investigated and the log file is no more required.

When working with BI server in Linux OS, use the [HKEY_LOCAL_MACHINE] registry key. When working with BI server/desktop application in Windows OS, determine settings for all users of the operating system in the [HKEY_LOCAL_MACHINE] registry key or for the current user in the [HKEY_CURRENT_USER] registry key.

Operation Log

To output debug info, create the Log section in the registry key [HKEY_CURRENT_USER\Software\Foresight\Foresight Analytics Platform\10.0] with the following parameters:

Parameters Description
FileName The string parameter that contains path and name of the file, to which debug info is output. Logging level is determined in the SeverityLevel parameter.
IsolatedByDate The REG_DWORD parameter that indicates whether a file should be split by dates.
Available values:
  • 0. Default value. Debug info is saved to one file specified in the FileName parameter.

  • 1. Debug info is saved to different files. A new file for recording debug info is created daily. The current date is added to the file name.

It is used together with the FileName parameter.
SeverityLevel The REG_DWORD parameter that contains the logging level.
Available values:
  • 0. Logging level - Trace. All debug info generated in platform kernel is logged.

IMPORTANT. Logging of all debug info affects platform performance and significantly increases debug info amount in the file.

  • 1. Logging level - Debug. Additionally for the Info level, SQL queries and their parameters, user authentication information are logged via LDAP protocol, if domain/integrated domain authentication is used.

  • 2. Default value. Logging level - Info. Main method of outputting debug info that includes the Warning level and information about operation execution duration, library loading/unloading, information messages generated by the platform.

  • 3. Logging level - Warning. Additionally for the Error level, warnings are logged.

  • 4. Logging level - Error. Additionally for the Critical level, errors are logged.

  • 5. Logging level - Critical. Only critical errors are logged.

It is used if one of the parameters is set: WriteToDebugOutput with the 1 value; WriteToSyslog with the 1 value; FileName.
WriteToDebugOutput The REG_DWORD parameter that indicates whether debug info can be output to the stderr error stream in Linux OS or to Debugger in Windows OS.
Available values:
  • 0. Default value. Debug messages about loaded and unloaded libraries are displayed.

  • 1. The information displayed if the parameter is set to 0 is appended with the debug info corresponding to the logging level specified in the SeverityLevel parameter.

WriteToSyslog The REG_DWORD parameter that indicates whether debug info can be output in syslog in Linux OS. Debug info is created with the fp-log category.
Available values:
  • 0. Default value. Debug info is not output in syslog.

  • 1. Debug info is output in syslog. Logging level is determined in the SeverityLevel parameter.

SymbolWrapperMode

The REG_DWORD parameter that indicates whether line feed characters (\r\n\v) should be escaped and replaced with their equivalent text view as escape sequences. It is used to convert multi-string information into one string, for example, when executing SQL queries with parameters.

Available values:

  • 0. Escaping is not used.

  • 1. Default value. Line feed characters (\r\n\v) are replaced with their equivalent text view.

Parameters are optional. If any of the parameters is absent in the registry, its default value is used.

NOTE. The FileName, WriteToDebugOutput, WriteToSyslog parameters do not depend on each other. For example, in Linux OS debug info can be saved to a file, output to the stderr error stream, and to syslog.

The user who works in the BI server/desktop application should have permissions to change debug info file.

In Linux OS use the following commands:

  1. Make www-data owner of the created file, for example:

sudo chown www-data:www-data /var/log/mydir/myfile.log

  1. Grant write permissions for the owner and read permissions for other users:

sudo chmod u=rw,g=r,o=r /var/log/mydir/myfile.log

The specified example is applicable for granting permissions in Debian-based distributions. When working in other Linux OS distributions replace www-data:www-data with apache:apache for RedHat-based distributions or with apache2:apache2 for ALT Linux.

If required, in Windows OS one can set up permissions in file properties.

To output additional debug info of development environment and task scheduler make changes in the registry specified below.

Development Environment Debug Info

Debug info can be used to detect errors, which may cause memory leaks. To log in the file the debug info generated by development environment kernel, make changes in the registry:

  1. Make sure that the registry contains the Log section with the FileName and SeverityLevel parameters.

NOTE. Development environment debug info is output if the SeverityLevel parameter is set to 0, 1, or 2. Additionally, SQL queries to repository system tables are logged, which are created on addressing repository objects.

  1. Add the following parameters:

Debug Info of Task Scheduler

To log in the file the debug info generated by task scheduler, make changes in the registry.

IMPORTANT. Task scheduler and BI server must be started on different servers.

By default, debug info is output in Linux OS to the /var/log/syslog file if scheduler service file contains the PP_LOG=1 value.

To redetermine debug info file location and name in Linux OS:

  1. Create a configuration file to set up registry files with the *.reg extension, for example:

[HKEY_LOCAL_MACHINE\SOFTWARE\Foresight\Foresight Analytics Platform\10.0\Scheduler]

"Trace"=dword:00000003

[HKEY_LOCAL_MACHINE\SOFTWARE\Foresight\Foresight Analytics Platform\10.0\Log]

"FileName"="/var/log/Scheduler/name_for_log.log"

"SeverityLevel"=dword:00000003

Where:

    • Trace. Log information about container tasks. Parameter of the REG_DWORD type with the 3 value in the Scheduler section of the registry key [HKEY_LOCAL_MACHINE\Software\Foresight\Foresight Analytics Platform\10.0].

    • FileName and SeverityLevel in the Log section of the registry key [HKEY_LOCAL_MACHINE\Software\Foresight\Foresight Analytics Platform\10.0].

  1. Place the file at: /opt/foresight/fp10.x-biserver/etc/registry/.

  2. Make sure that PP_LOG=0 in the scheduler service file.

  1. Make sure that the registry contains the Log section with the FileName and SeverityLevel parameters.

  2. Create the Scheduler section in the registry key [HKEY_LOCAL_MACHINE\Software\Foresight\Foresight Analytics Platform\10.0] if it is absent.

  3. In the Scheduler section create the Trace parameter of the REG_DWORD type with the 3 value. The parameter is used to log information about container tasks.

See also:

Additional Settings of Development Environment | Working with Debug Info