PHP code example of understand / understand-laravel4
1. Go to this page and download the library: Download understand/understand-laravel4 library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
/**
* Specify which handler to use - sync, queue or async.
*
* Note that the async handler will only work in systems where
* the CURL command line tool is installed
*/
'handler' => 'async',
return [
/**
* Input key
*/
'token' => 'your-input-token-from-understand-io',
/**
* Specifies whether logger should throw an exception of issues detected
*/
'silent' => true,
/**
* Specify which handler to use - sync, queue or async.
*
* Note that the async handler will only work in systems where
* the CURL command line tool is installed
*/
'handler' => 'sync',
'log_types' => [
'eloquent_log' => [
'enabled' => false,
'meta' => [
'session_id' => 'UnderstandFieldProvider::getSessionId',
'request_id' => 'UnderstandFieldProvider::getProcessIdentifier',
'user_id' => 'UnderstandFieldProvider::getUserId',
'env' => 'UnderstandFieldProvider::getEnvironment',
'client_ip' => 'UnderstandFieldProvider::getClientIp',
]
],
'laravel_log' => [
'enabled' => true,
'meta' => [
'session_id' => 'UnderstandFieldProvider::getSessionId',
'request_id' => 'UnderstandFieldProvider::getProcessIdentifier',
'user_id' => 'UnderstandFieldProvider::getUserId',
'env' => 'UnderstandFieldProvider::getEnvironment',
]
],
'exception_log' => [
'enabled' => true,
'meta' => [
'session_id' => 'UnderstandFieldProvider::getSessionId',
'request_id' => 'UnderstandFieldProvider::getProcessIdentifier',
'user_id' => 'UnderstandFieldProvider::getUserId',
'env' => 'UnderstandFieldProvider::getEnvironment',
'url' => 'UnderstandFieldProvider::getUrl',
'method' => 'UnderstandFieldProvider::getRequestMethod',
'client_ip' => 'UnderstandFieldProvider::getClientIp',
'user_agent' => 'UnderstandFieldProvider::getClientUserAgent'
]
]
]
];