Laravel library for logging and store it to s3
- PHP >= 7.2
- Laravel >= 5.6
- Install with composer
composer require arispati/laravel-log-s3
php artisan vendor:publish --provider="Arispati\LaravelLogS3\Providers\LaravelLogS3Provider" --tag="config"
<?php
return [
'disk' => 's3',
'path' => 'logs',
'timezone' => 'Asia/Jakarta'
];
use Arispati\LaravelLogS3\Facades\Log;
// create log name
Log::new('new-log');
// enabled to write file
Log::enabled(true);
// logging
Log::debug('Log Start');
// create a timer
Log::timer('log-start');
// logging with timer duration
Log::debugDuration('Log End', 'log-start');
// write to file
Log::write();
./vendor/bin/phpunit