When technical issues occur with Studio Server or any of the client applications that are logged in to the server, logging can be enabled for troubleshooting purposes. The created log files store all SQL queries and Web service details.
This article describes the logging functionality in Studio Server 10.13 or lower.
Note: For Studio Server 10.14 or higher, see Logging Studio Server activity in Studio Server 10.14 or higher.
IMPORTANT: With low-level logging turned on, the file size of the log files will keep growing, thereby consuming disk space and reducing performance.
About the structure
Files are written to the logging directory (as defined in configserver.php) in the following structure:
OUTPUTDIRECTORY > day > client IP
- ‘day’ directory: this represents the day (in YYYYMMDD format) on which a log operation took place. This bundles all logging operations on a daily basis, thereby making it easy to clean up. For example, you can throw away directories older than one week manually or by your home-brewed batch job.
- ‘client IP’ directory: this is created within the ‘day’ folder whenever logging was done in context of a certain client application. The client works from a certain IP address which is used as the folder name. Logging written for all applications working from that IP are bundled in this directory which makes it easy to for example identify problematic work stations. This directory contains HTML files (or text files) named after the PHP module used as entry point by the client application, or the name of the Web service requested.
Note: Make sure that read and write access is set to the log folder for the following users:
|
Type of files that are logged
The following files can be found in the logging directory tree:
- File name: ent_log_errors.htm
- Location: This file might appear in a ‘client IP’ directory.
- Description: Indicates that an ERROR has occurred for this client. The full context can be found in any of logged files in the same folder.
Note: This file is not available when the LOGFILE_FORMAT option is set to 'json'.
- File name: phpinfo.htm:
- Location: This file always appears in the ‘day’ folder and in the ‘client IP’ folder. For performance reasons it is only generated once per day, just before the first server operation gets executed.
- Description: Contains valuable information for analysis. When contacting WoodWing Support, please make sure to include this file.
- File names: sce_profile_mysql.htm, sce_profile_mssql.htm, or sce_profile_oracle.htm.
- Description: Server profile logs containing information about how long operations take and how much memory is used.
Note: Only available when DEBUGLEVELS is defined as INFO or DEBUG, and PROFILELEVEL is set in a range of 1 to 5.
Enabling low-level logging
Info: Performing the described step requires direct server access. Depending upon how your system is hosted and the level of access you have to that system, coordination may be required with your Partner or WoodWing Support team. For a full overview of the steps that need to be done by WoodWing and how to request them, see WoodWing Cloud - Change management.
The low-level logging feature is enabled through the following settings:
- DEBUGLEVELS
- OUTPUTDIRECTORY
- PROFILELEVEL
- LOGSQL
- LOGFILE_FORMAT
DEBUGLEVELS
- File: configserver.php file (recommended: config_overrule.php file)
- Possible values:
- NONE
- ERROR
- WARN
- INFO
- DEBUG
Notes:
|
- Default value: NONE
- Example:
define ('DEBUGLEVELS', serialize( array(
// CLIENT IP => DEBUGLEVEL
'default' => 'INFO', // 'default' entry is mandatory
'127.0.0.1' => 'DEBUG',
)));
Note: There must be one item named 'default' which is used for all clients that are not explicitly configured. By default, some high-level information is logged for all clients. This is indicated by the 'default' key, which is mandatory:
When you want to monitor a client application in great detail (while not being too interested in other clients), add the IP address that the client is using:
In this example, some high-level INFO logging is written for all clients, while for the client(s) running on IP 123.123.123.123 the most detailed DEBUG logging is written. |
OUTPUTDIRECTORY
The path to write log files to.
Note: When a path is defined, a message "Running in Debug mode" is shown in the Studio Server Log In screen. |
- File: configserver.php file (recommended: config_overrule.php file)
- Possible value: any path.
Note: The path needs to end with a forward slash '/'. Example: ‘c:/entlog/output/’.
- Default value: empty (low-level logging not enabled.)
- Example:
define ('OUTPUTDIRECTORY', '');
PROFILELEVEL
Used for profiling PHP code.
Note: The use of this option requires DEBUGLEVELS to be set to ‘INFO’ or ‘DEBUG’, else the value of the PROFILELEVEL option is ignored.
- File: configserver.php file (recommended: config_overrule.php file)
- Possible value: 0 to 5, (0: no profiling, 5: most detailed profiling).
- Default value: 1
- Example:
define ('PROFILELEVEL', 1);
LOGSQL
Used for logging all SQL statements to the main log file.
Note: The use of this option requires DEBUGLEVELS to be set to ‘INFO’ or ‘DEBUG’, else the value of the LOGSQL option is ignored.
- File: configserver.php file (recommended: config_overrule.php file)
- Possible value: true or false
- Default value: false
- Example:
define ('LOGSQL', false);
LOGFILE_FORMAT
Used for defining the format in which the file is saved:
- HTML
- plain-text
- JSON (requires Studio Server 10.11.0 or higher)
Notes:
|
- File: configserver.php file (recommended: config_overrule.php file)
- Possible value: html, plain, or json
- Default value: html
- Example:
define ('LOGFILE_FORMAT', 'html');
Viewing log files
Viewing log files is done as follows:
- Manually by accessing the drive on which the files are stored, navigating to the file and opening it manually.
- Through Studio Server via Advanced > Server Logs.
Opening the application will show a list of daily log directories.
Each of these directories links to a list of directories named after the client IP.
From there, the log files can be accessed.
Comment
Do you have corrections or additional information about this article? Leave a comment! Do you have a question about what is described in this article? Please contact Support.
0 comments
Please sign in to leave a comment.