webservice.php Configuration
The webCOMAND Web Service configuration file is located at:
packages/io_comand_webservice/config/webservice.php
It contains the following configuration options.
- log_request - If defined and TRUE, web service request options/parameters will be logged to the Notes field of Web Service Activity Logs and the Web Service Log (if enabled).
- log_request_body - If defined and TRUE, the body of web service requests will be logged to the Notes field of Web Service Activity Logs and the Web Service Log (if enabled).
- webservice_log - An associative array with the following options
- enabled - If defined and TRUE, web service requests will be logged to the Web Service Log file.
- filename - The full file system path and filename to the Web Service Log file. The filename may contain percent variables for the year (%Y), month (%m) and day (%d).
- level - The highest event type level to include in the log. All higher levels will not be logged.
<?php
/**
* Defines configuration values for webCOMAND Web Services.
*/
$config = [
// Log web service request options/parameters to the Notes field of Web Service Activity Logs and the Web Service Log (if enabled).
'log_request' => FALSE,
// Log the body of web service requests to the Notes field of Web Service Activity Logs and the Web Service Log (if enabled).
'log_request_body' => FALSE,
// The web socket port that the socket server will bind to. This must match what is defined in the Apache configuration for incoming connections
'webservice_log' => [
'enabled' => FALSE,
'filename' => COMAND_HOME.'/files/logs/webservice_%Y-%m-%d.log',
'level' => 6
]
];
webCOMAND config.php
Custom overrides can be configured in webcomand/config.php as:
<?php
$config = [
'io_comand_webservice' => [
'webservice' => [
'log_request'=> TRUE,
'log_request_body' => TRUE,
'webservice_log' => [
'enabled' => TRUE,
'filename' => COMAND_HOME.'/files/logs/webservice_%Y-%m-%d.log',
'level' => 6 // 6=Notice, 5=Warning, 4=Error
]
]
]
];