1. Go to this page and download the library: Download ddup/logger 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/ */
ddup / logger example snippets
function getLogger($client){
switch ($client){
case "ali":
return new \Ddup\Logger\Aliyun\AliyunLogger(
new \Ddup\Logger\Aliyun\Config\AliyunLogStruct(
[
'access_key_id' => '',
'access_key_secret' => '',
'endpoint' => '',
'project' => '',
'store' => '',
'topic' => ''
]
));
break;
case "lazy":
return new \Ddup\Logger\Cli\LazyLogger;
break;
default:
return new \Ddup\Logger\Cli\CliLogger;
}
}