Knowledge Base > Additional Settings of Foresight Analytics Platform > Advanced Logging and Getting Additional Debug Info
In this article:
When working in Foresight Analytics Platform, the kernel forms and outputs debug info. For details see specialized programs, for example, DebugView, which 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 applications. Thus, remove the parameters specified below after the problem is investigated and the log file is no more required.
The description below displays the example of the [HKEY_CURRENT_USER] registry key that is used only for the current user. If it is assumed to determine settings for all operating system users or settings are determined during the work with Foresight Analytics Platform BI server, the [HKEY_LOCAL_MACHINE] registry key should be used.
Debug messages are created and displayed by means of the REG_DWORD parameter WriteToDebugOutput located in the key [HKEY_CURRENT_USER\Software\Foresight\Foresight Analytics Platform\10.0\Log]. By default, this parameter can be absent in the registry, debug messages are displayed by the platform kernel. To disable displaying of all debug messages, except for information about loaded and unloaded libraries, create the WriteToDebugOutput parameter with the 0 value.
To export debug info to a file, make changes in the registry:
Create the Log section in the registry key [HKEY_CURRENT_USER\Software\Foresight\Foresight Analytics Platform\10.0] if it is absent.
Create the parameters in the Log section:
FileName. The string parameter that contains path and name of the file, to which the debug info is exported.
SeverityLevel. The REG_DWORD parameter that contains the logging level. The following values can be set for this parameter:
0. Logging level - Trace. All debug info generated by Foresight Analytics Platform kernel is registered.
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, user authentication information is 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 informtion about operation execution duration, repository query parameters.
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.
IsolatedByDate. The REG_DWORD parameter that indicates whether a file should be split by dates. If the parameter is created and has the 1 value, a new file is created daily, to which debug output is exported. The current date is added to the file name.
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_CURRENT_USER\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_CURRENT_USER\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_CURRENT_USER\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_CURRENT_USER\Software\Foresight\Foresight Analytics Platform\10.0].
FileName and SeverityLevel in the Log section in the registry key [HKEY_CURRENT_USER\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_CURRENT_USER\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: