The low-level debug logging feature is used for storing all SQL queries and Web service details for debugging purposes.
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 defined logging directory 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.
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.
- 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 with DEBUGLEVELS is defined as INFO or DEBUG, and PROFILELEVEL is set in a range of 1 to 5.
Enabling low-level logging
The low-level logging feature is enabled through the following settings:
Note: Since Enterprise 8, DEBUGLEVEL has been renamed to DEBUGLEVELS and allows to specify level per client IP.
-
File: configserver.php file
- Possible values:
- NONE
- ERROR
- WARN
- INFO
- DEBUG
Note: The amount of information that is stored increases with each option: NONE saves no information while DEBUG stores the highest amount of information.
Note: Fatal errors are logged in the php.log file. Normally, this file is not present in the server log folder, indicating that there are no fatal errors.
- 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. |
The path to write log files to.
Note: When a path is defined, a message "Running in Debug mode" is shown in the Enterprise Server Log In screen.
|
-
File: configserver.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', '');
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
- Possible value: 0 to 5, (0: no profiling, 5: most detailed profiling).
- Default value: 1
- Example:
define ('PROFILELEVEL', 1);
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
- Possible value: true or false
- Default value: false
- Example:
define ('LOGSQL', false);
Used for defining the format in which the file is saved: 'html' or 'plain'.
Note: The HTML format is better readable in a Web browser while the plain-text format can be easier searched by using command line tools such as GREP.
Note: The log file always contains UTF-8 characters.
-
File: configserver.php file
- Possible value: html or plain
- Default value: html
- Example:
define ('LOGFILE_FORMAT', 'html');
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.