In this article:
When working in Foresight Analytics Platform, the kernel forms and outputs debug info.
To view debug info, use:
The stderr error stream in Linux OS.
syslog in Linux OS.
Debugger in Windows OS that can be viewed by a special software, for example, DebugView. DebugView is included in the Sysinternals software package.
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.
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:
|
| SeverityLevel | The REG_DWORD parameter that contains the logging level. Available values:
IMPORTANT. Logging of all debug info affects platform performance and significantly increases debug info amount in the file.
|
| 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:
|
| 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:
|
| 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:
|
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:
Make www-data owner of the created file, for example:
sudo chown www-data:www-data /var/log/mydir/myfile.log
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.
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:
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.
Add the following parameters:
In the key [HKEY_LOCAL_MACHINE\Software\Foresight\Foresight Analytics Platform\10.0\Debug] create the GCTrace parameter of the REG_DWORD type with the 1 value. The parameter is used to log all garbage collector messages.
In the key [HKEY_LOCAL_MACHINE\Software\Foresight\Foresight Analytics Platform\10.0\DevEnv] create parameters of the REG_DWORD type and set them to 1:
DevEnvDebug. Log information about components creation.
DevEnvParserDebug. Log development environment parser information.
In the key [HKEY_LOCAL_MACHINE\Software\Foresight\Foresight Analytics Platform\10.0\Fore] create the parameters:
CheckLeaks. The REG_DWORD parameter allows for checking of memory leaks after closing repository in the desktop application. To enable the check, set the parameter to 1. If there are memory leaks, the dialog box for saving memory leaks to file opens.
LeaksGraphFile. The path and name of the file, to which the memory leaks list is to be saved on closing repository. If the parameter is set, the dialog box does not open, and the list is saved to the specified file. The file is created in the TGF (trivial graph format) format.
ExternRefLogging. The REG_DWORD parameter allows for logging of changes in external links on logging in to repository.
ExtRefChangesFile. The path and name of the file, to which the log of changes in external links is to be saved on closing repository. The file format is TXT.
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:
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].
Place the file at: /opt/foresight/fp10.x-biserver/etc/registry/.
Make sure that PP_LOG=0 in the scheduler service file.
Make sure that the registry contains the Log section with the FileName and SeverityLevel parameters.
Create the Scheduler section in the registry key [HKEY_LOCAL_MACHINE\Software\Foresight\Foresight Analytics Platform\10.0] if it is absent.
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