1. Go to this page and download the library: Download wappr/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/ */
wappr / logger example snippets
eague\Flysystem\Filesystem;
use League\Flysystem\Adapter\Local;
use Psr\Log\LogLevel;
use wappr\Logger;
$adapter = new Local(__DIR__.'/storage/logs/');
$filesystem = new Filesystem($adapter);
$logger = new Logger($filesystem, LogLevel::DEBUG);
$logger->info('hello');
eague\Flysystem\Filesystem;
use League\Flysystem\Adapter\Local;
use Psr\Log\LogLevel;
use wappr\Logger;
$adapter = new Local(__DIR__.'/storage/logs/');
$filesystem = new Filesystem($adapter);
$logger = new Logger($filesystem, LogLevel::DEBUG);
$logger->setFilenameFormat('m-d-Y'); // change the format to month day year
$logger->setFilenameExtension('txt'); // change the extension to txt
$logger->info('hello');
ws\S3\S3Client;
use League\Flysystem\AwsS3v3\AwsS3Adapter;
use League\Flysystem\Filesystem;
use Psr\Log\LogLevel;
use wappr\Logger;
$client = S3Client::factory([
'credentials' => [
'key' => '',
'secret' => '',
],
'region' => 'us-east-1',
'version' => 'latest',
]);
$adapter = new AwsS3Adapter($client, 'bucket-name');
$filesystem = new Filesystem($adapter);
$logger = new Logger($filesystem, LogLevel::DEBUG);
$logger->setFilenameFormat('/Ymd/m-d-Y_Gis');
$logger->info('hello');
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.