Knowledgebase Home | Favorites | Login Knowledgebase Home | Favorites | Login
Search the Knowledgebase Browse by Category or Article ID
Enabling License Statistics debug logs for troubleshooting
User Opinions (5 votes)
80% thumbs up 20% thumbs down

Thank you for rating this answer.
Article ID: 224

Last Updated: 10th June 2010 11:43:17 am

If you experience any problems with License Statistics, you may be asked to enable debug mode in License Statistics, as described below, and send us the log files from the License Statistics log directory.

To enable debug mode in the web interface, you need to set the system environment variable XF_LICSTAT_DEBUG and then restart License Statistics, as detailed below. (Instructions given for accessing environment variable settings are for Windows 7.)

  1. Open the Windows Control Panel and select System and Security.
  2. Select System from the System and Security options.
  3. Select Advanced system settings from the list of options in the left column of the System window.
  4. From the System Properties dialog that appears, select Environment Variables... 



  5. Under System variables, select New...



  6. Enter XF_LICSTAT_DEBUG for the Variable name, and set the value to 1 (enabled).



  7. Click OK to add the variable.



  8. Click OK from the Environment Variables dialog to save your changes, and then click OK from the System Properties dialog.

  9. Restart License Statistics.
The log files (php.log, pdo.log, etc.) will be written in the log directory under the License Statistics installation directory.

To enable logging for slow database queries, enable the slow_query_log setting in the config.ini file, located in the MySQL directory:

# Enable logging of slow queries. Enable only when advised by X-Formation support.
slow_query_log = 1


where 1 is enabled.

The config.ini also contains the following additional settings for slow queries that may be changed if needed:

# If a query takes more than the specified number of seconds it will be logged
long_query_time = 10
# log-output = [FILE | TABLE] (table is slower)
log-output = FILE
# Path to logfile
slow-query-log-file = ../../log/mysql_slow.log


When both PHP logging and slow query logging are enabled, you'll notice that the web interface becomes slow. After sending us all the debug logs from the log directory, you can disable debug mode by either removing the XF_LICSTAT_DEBUG environment variable or setting it to 0, and resetting the slow_query_log setting in the config.ini file to 0:

slow_query_log = 0
Related Content
Related Articles
Attachments
No attachments were found.
All Content Copyright © 2002-2012 X-Formation. All Rights Reserved.