Debug Logging

Statistica debug logging enables you to specify logging of Statistica options.

Debug logging is designed to be a tool to help you conduct performance tuning or track down installation or operational issues.
Note: It is not related to Spreadsheet logging, which is used to track/audit changes to a Spreadsheet.
The debug log can be helpful in diagnosing issues such as which statopts.xml file is used on startup.

Logging can be done either to a Statistica report Window (called "Report Logging" or sometimes debug logging), or to an external file (called "File Logging"). Additionally, an external application can also connect into the Statistica logging mechanism for integration with an external logging system using COM and the Logging event sink. The logging destination is controlled by different command-line parameters.

When using File Logging, you can either have the system automatically generate file names based on date stamps, or you can specify specific complete file names to use. Having the system generate the names based on date stamps is useful for logging a Statistica process running for several days; as the date changes, the next log file is created based on the new date. The format for the File Logging contains timestamps in Universal Coordinated Time (UCT).

When using Report Logging, the logging information is color coded by the level of logging information to help you identify errors, warnings, and informational messages.

Parameters Description
/loglevel=n This defines how much detail to log in the Statistica application. The higher log level number includes all the information logged at all the lower levels as well. "n" is a number 0 through 8, defined as follows.

0 scNoLogging

No logging is performed.

1 scLogLevelCritical

Critical errors are logged. In the report window, these show up in bold face with a red background.

2 scLogLevelWarning

Warnings are logged. In the report window, these show up with a yellow background.

3 scLogLevelInformational

In the report window, these show up with a green background.

4 scLogLevelConfiguration

In the report window, these show up with a light blue background.

5 scLogLevelDetailed

Includes many entry/exit points for automation functions. In the report window, these show up with a white background.

6 scLogLevelLow (or scLogLevelEverything)

Low level logging; includes many details. In the report window, these show up with light grey italic font color with a white background.

7 scLogLevelSpecial

Logs the same information as scLogLevelLow, but enables the extended options defined below.

The following extended options are useful only when logging to a report window. The values are added to the constant if scLogLevelSpecial (7) is used.

For example, if you want to include the scLogMemoryFootprint, you would specify 7+16, which is 23, or /loglevel=23. To include scLogTimeStamps and scLogMemoryFootprint, specify 7+8+16=31, or loglevel=31.

8 scLogTimeStamps

Note that when logging to a log file, date/time is automatically included, but when logging to a report window, it is not. This is because the report window is generally useful for determining sequencing of events, not time they occurred. When this option is specified, logging to the report window logs entries with the system TickCount, or the number of milliseconds from system startup.

16 scLogMemoryFootprint

On every logging entry, write out the memory footprint of the process (VM, Private Bytes); useful when debugging memory leaks / unexpectedly large memory allocations in production environments.
/logpath=

Providing this parameter turns on logging to a file. The log file is created in this directory, using a filename based on the current date. If the path subdirectories do not exist, Statistica attempts to create them. The default name is of the form DBGyymmdd.log, where yy is current two digit year, mm is current two digit month, and dd is current two digit day, e.g., if today is January 4, 2007, it would create the name DBG070104.log. The "DBG" prefix can be changed by the /logfileprefix command-line parameter.

Note: For File Logging, the default logging level is off, so you need to add a /loglevel parameter to see log information. For example: statist.exe /logpath="c:\logdir\" /loglevel=4
/logfileprefix=

This parameter controls the prefix used for the log file name when using file logging with the /logpath option. By default, this prefix is DBG. For example, changing the following: statist.exe /logpath="c:\logdir\" /loglevel=4 /logfileprefix="X"

Creates log files in the path c:\logdir of the form Xyymmdd.log, For example X070104.log

/logfilename= This parameter enables File Logging, but allows you to specify the full path name of the log file. This form of File Logging does not use a date stamp for the file name, thus the log file could grow large if enabled on a Statistica process that runs for several days. If the subdirectories of the log file path name do not exist, they attempt to be created.
/logreport

If this parameter is specified by itself (/logreport), or if a parameter value is added as "true" or "1" (/logreport=true), Statistica starts Report Logging to a Statistica report window on startup. For example: statist.exe /logreport=true

The report window is color coded depending on the logging level of the individual entries. These color codes are described in the /loglevel section above.

Note: When using file logging, the times specified in the log file are in Universal Coordinated Time (UCT); and you need to adjust to your time zone when looking at the file.