- Added new constants P_NAME_REQUEST_ID and

P_NAME_REQUEST_DATA_FORMATTER tp logLib
- Added new properties _requestId and _requestDataFormatter to LogLib
- Added new public method setConfigs to LogLib
- Added possibility to choose the request id when the LogLib is loaded
- Added possibility to format the request data using the
_requestDataFormatter parameter
- Now LogLib always stores the request id + log level
- Added possibility to change the execution time parameter
- Adapted application/core/JOB_Controller.php code
- Adapted application/core/JQW_Controller.php code
This commit is contained in:
Paolo
2020-09-11 17:43:39 +02:00
parent 01a8ec69de
commit fbd4ded720
4 changed files with 89 additions and 45 deletions
+11 -11
View File
@@ -5,9 +5,10 @@ if (!defined("BASEPATH")) exit("No direct script access allowed");
/**
* Job Queue Worker
*
* This controller acts as interface of the JobsQueueLib that contains all the needed functionalities to operate with
* the Jobs Queue System
* This is an abstract class that provide basic functionalities, it has to be extended to broaden its logic
* This controller acts as interface of the JobsQueueLib that contains
* all the needed functionalities to operate with the Jobs Queue System
* This is an abstract class that provide basic functionalities,
* it has to be extended to broaden its logic
*/
abstract class JQW_Controller extends JOB_Controller
{
@@ -18,14 +19,13 @@ abstract class JQW_Controller extends JOB_Controller
{
parent::__construct();
// Loads LogLib with different parameters
$this->load->library('LogLib', array(
'classIndex' => 5,
'functionIndex' => 5,
'lineIndex' => 4,
'dbLogType' => 'job', // required
'dbExecuteUser' => 'Jobs queue system'
));
// Changes the needed configs for LogLib
$this->loglib->setConfigs(
array(
'dbExecuteUser' => 'Jobs queue system',
'requestId' => 'JQW'
)
);
// Loads JobsQueueLib library
$this->load->library('JobsQueueLib');