1. Go to this page and download the library: Download timefrontiers/php-error-log 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/ */
timefrontiers / php-error-log example snippets
use TimeFrontiers\ErrorLog;
use TimeFrontiers\ErrorLogging\LogPolicy;
$log = new ErrorLog(
base_dir: '/srv/linktude/var',
process_name: 'billing-operation',
is_error_log: true,
policy: new LogPolicy(
maxErrors: 50,
maxRecordBytes: 65_536,
maxFileBytes: 10_485_760,
retentionSeconds: 2_592_000,
maxRetentionDeletes: 1_000,
maxReadBytes: 10_485_760,
),
);